Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NomsValueFromDecodedJSON ¶
func NomsValueFromDecodedJSON(vrw types.ValueReadWriter, o interface{}, useStruct bool) types.Value
NomsValueFromDecodedJSON takes a generic Go interface{} and recursively tries to resolve the types within so that it can build up and return a Noms Value with the same structure.
Currently, the only types supported are the Go versions of legal JSON types: Primitives:
- float64
- bool
- string
- nil
Composites:
- []interface{}
- map[string]interface{}
func NomsValueUsingNamedStructsFromDecodedJSON ¶
func NomsValueUsingNamedStructsFromDecodedJSON(vrw types.ValueReadWriter, o interface{}) types.Value
NomsValueUsingNamedStructsFromDecodedJSON performs the same function as NomsValueFromDecodedJson except that it always decodes JSON objects into structs. If the JSON object has a string field name '_name' it uses the value of that field as the name of the Noms struct.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.