Documentation
¶
Index ¶
- Variables
- func Marshal(v any) ([]byte, error)
- func MarshalString(v any) (string, error)
- func MustMarshal(v any) []byte
- func MustMarshalString(v any) string
- func MustUnmarshal(bs []byte, v any)
- func MustUnmarshalString(s string, v any)
- func MustUnmarshalTo[T any](a any) T
- func Unmarshal(bs []byte, v any) error
- func UnmarshalString(s string, v any) error
- func UnmarshalTo[T any](a any) (T, error)
- type MarshalOptions
- type Options
- type UnmarshalOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var G = Options{ MarshalOptions: MarshalOptions{ IndentSpace: 2, IndentSequence: true, SingleQuote: false, FlowStyle: false, LiteralStyleIfMultiline: true, }, UnmarshalOptions: UnmarshalOptions{}, }
Functions ¶
func MarshalString ¶
func MustMarshal ¶
func MustMarshalString ¶
func MustUnmarshal ¶
func MustUnmarshalString ¶
func MustUnmarshalTo ¶
func UnmarshalString ¶
func UnmarshalTo ¶
Types ¶
type MarshalOptions ¶
type MarshalOptions struct { IndentSpace int IndentSequence bool SingleQuote bool FlowStyle bool LiteralStyleIfMultiline bool }
func (MarshalOptions) MarshalString ¶
func (o MarshalOptions) MarshalString(v any) (string, error)
func (MarshalOptions) MustMarshal ¶
func (o MarshalOptions) MustMarshal(v any) []byte
func (MarshalOptions) MustMarshalString ¶
func (o MarshalOptions) MustMarshalString(v any) string
type Options ¶
type Options struct { MarshalOptions UnmarshalOptions }
type UnmarshalOptions ¶
type UnmarshalOptions struct { }
func (UnmarshalOptions) MustUnmarshal ¶
func (o UnmarshalOptions) MustUnmarshal(bs []byte, v any)
func (UnmarshalOptions) MustUnmarshalString ¶
func (o UnmarshalOptions) MustUnmarshalString(s string, v any)
func (UnmarshalOptions) UnmarshalString ¶
func (o UnmarshalOptions) UnmarshalString(s string, v any) error
Click to show internal directories.
Click to hide internal directories.