(path string)
| 727 | if indent { |
| 728 | encoder.SetIndent("", " ") |
| 729 | } |
| 730 | if err := encoder.Encode(value); err != nil { |
| 731 | return nil, err |
| 732 | } |
| 733 | return bytes.TrimSuffix(buf.Bytes(), []byte("\n")), nil |
| 734 | } |
| 735 | |
| 736 | func spacePythonJSONSeparators(data []byte) []byte { |
| 737 | out := make([]byte, 0, len(data)+8) |
| 738 | inString := false |
| 739 | escaped := false |
| 740 | for _, b := range data { |
| 741 | out = append(out, b) |
| 742 | if escaped { |
no outgoing calls
no test coverage detected