MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / toGoRepr

Method toGoRepr

pkg/util/json/json.go:2759–2769  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2757func (j jsonString) toGoRepr() (interface{}, error) { return string(j), nil }
2758func (j jsonNumber) toGoRepr() (interface{}, error) { return json.Number(j.String()), nil }
2759func (j jsonArray) toGoRepr() (interface{}, error) {
2760 result := make([]interface{}, len(j))
2761 for i, e := range j {
2762 next, err := e.toGoRepr()
2763 if err != nil {
2764 return nil, err
2765 }
2766 result[i] = next
2767 }
2768 return result, nil
2769}
2770func (j jsonObject) toGoRepr() (interface{}, error) {
2771 result := make(map[string]interface{})
2772 for _, e := range j {

Callers

nothing calls this directly

Calls 1

toGoReprMethod · 0.65

Tested by

no test coverage detected