MakeDJSON returns a JSON value given a Go-style representation of JSON. * JSON null is Go `nil`, * JSON true is Go `true`, * JSON false is Go `false`, * JSON numbers are json.Number | int | int64 | float64, * JSON string is a Go string, * JSON array is a Go []interface{}, * JSON object is a Go map[s
(d interface{})
| 2697 | // * JSON array is a Go []interface{}, |
| 2698 | // * JSON object is a Go map[string]interface{}. |
| 2699 | func MakeDJSON(d interface{}) (Datum, error) { |
| 2700 | j, err := json.MakeJSON(d) |
| 2701 | if err != nil { |
| 2702 | return nil, err |
| 2703 | } |
| 2704 | return &DJSON{j}, nil |
| 2705 | } |
| 2706 | |
| 2707 | var dNullJSON = NewDJSON(json.NullJSONValue) |
| 2708 |