()
| 1669 | return result, nil |
| 1670 | } |
| 1671 | func (j jsonObject) toGoRepr() (interface{}, error) { |
| 1672 | result := make(map[string]interface{}) |
| 1673 | for _, e := range j { |
| 1674 | next, err := e.v.toGoRepr() |
| 1675 | if err != nil { |
| 1676 | return nil, err |
| 1677 | } |
| 1678 | result[string(e.k)] = next |
| 1679 | } |
| 1680 | return result, nil |
| 1681 | } |
| 1682 | |
| 1683 | // Pretty pretty-prints the given JSON document as required by jsonb_pretty. |
| 1684 | func Pretty(j JSON) (string, error) { |