NewEncoder returns a new JSON encoder
()
| 13 | |
| 14 | // NewEncoder returns a new JSON encoder |
| 15 | func NewEncoder() *Encoder { |
| 16 | writer := bytes.NewBuffer(nil) |
| 17 | scratch := make([]byte, 64) |
| 18 | |
| 19 | return &Encoder{w: writer, Value: newValue(writer, &scratch)} |
| 20 | } |
| 21 | |
| 22 | // String returns the String output of the JSON encoder |
| 23 | func (e Encoder) String() string { |