Documentation
¶
Index ¶
- func DecodeFromString(s string, v interface{}) error
- func EncodeToString(v interface{}) (string, error)
- func Marshal(v interface{}) ([]byte, error)
- func PrettyPrint(v interface{}) (string, error)
- func Unmarshal(data []byte, v interface{}) error
- func ValidateJSON(data []byte) error
- func ValidateJSONString(s string) error
- type Decoder
- type Delim
- type Encoder
- type Marshaler
- type Number
- type RawMessage
- type UnmarshalTypeError
- type Unmarshaler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeFromString ¶
DecodeFromString decodes JSON data from a string into the provided value.
func EncodeToString ¶
EncodeToString marshals and encodes the provided value directly into a string.
func PrettyPrint ¶
PrettyPrint marshals the provided value into a pretty-printed JSON string.
func ValidateJSON ¶
ValidateJSON checks if the provided byte slice is valid JSON.
func ValidateJSONString ¶
ValidateJSONString checks if the provided string is valid JSON.
Types ¶
type Decoder ¶
Type aliases to maintain compatibility with the json package types.
func NewDecoder ¶
NewDecoder initializes and returns a new JSON Decoder.
type Encoder ¶
Type aliases to maintain compatibility with the json package types.
func NewEncoder ¶
NewEncoder initializes and returns a new JSON Encoder.
type RawMessage ¶
type RawMessage = json.RawMessage
Type aliases to maintain compatibility with the json package types.
type UnmarshalTypeError ¶
type UnmarshalTypeError = json.UnmarshalTypeError
Type aliases to maintain compatibility with the json package types.
type Unmarshaler ¶
type Unmarshaler = json.Unmarshaler
Type aliases to maintain compatibility with the json package types.