Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Exts = []string{ JSONExt, YAMLExt, ".yml", }
Exts contains a list of all the valid marshalable extension types.
View Source
var JSONExt = ".json"
View Source
var Marshalers map[string]Marshaler
Marshalers is a map of extension to a Marshaler object for that extension.
View Source
var YAMLExt = ".yaml"
Functions ¶
Types ¶
type Marshaler ¶
type Marshaler interface { IsJSONLike() bool IsYAMLLike() bool Marshal(v interface{}) ([]byte, error) Unmarshal(data []byte, v interface{}) error }
Marshaler is a type that knows how to marshal and unmarshal data in one format.
var JSON Marshaler = &jsonMarshaler{}
var YAML Marshaler = &yamlMarshaler{}
Click to show internal directories.
Click to hide internal directories.