Export will attempt to convert the value to a Go representation and return it via an interface{} kind.

Export returns an error, but it will always be nil. It is present for backwards compatibility.

If a reasonable conversion is not possible, then the original value is returned.

undefined   -> nil (FIXME?: Should be Value{})
null        -> nil
boolean     -> bool
number      -> A number type (int, float32, uint64, ...)
string      -> string
Array       -> []interface{}
Object      -> map[string]interface{}

Export is referenced in 31 repositories