Discover Packages
github.com/go-kratos-ecosystem/components/v2
codec
package
Version:
v2.26.3
Opens a new window with list of versions in this module.
Published: Dec 15, 2024
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
Codec
Usage
package codec_test
import (
"log"
"github.com/go-kratos-ecosystem/components/v2/codec/json"
)
var j = json.Codec
func ExampleJSON() {
bytes, err := j.Marshal(map[string]string{
"key": "value",
})
if err != nil {
log.Fatal(err)
}
var dest map[string]string
err = j.Unmarshal(bytes, &dest)
if err != nil {
log.Fatal(err)
}
}
Expand ▾
Collapse ▴
Documentation
¶
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.