ParseJSON takes a string of JSON and returns a JSON value.
(s string, opts ...ParseOption)
| 1038 | |
| 1039 | // ParseJSON takes a string of JSON and returns a JSON value. |
| 1040 | func ParseJSON(s string, opts ...ParseOption) (JSON, error) { |
| 1041 | cfg := parseJSONDefaultConfig |
| 1042 | for _, o := range opts { |
| 1043 | o.apply(&cfg) |
| 1044 | } |
| 1045 | return cfg.parseJSON(s) |
| 1046 | } |
| 1047 | |
| 1048 | func init() { |
| 1049 | encoding.PrettyPrintJSONValueEncoded = func(b []byte) (string, error) { |
no test coverage detected
searching dependent graphs…