UseInternedStrings causes the Encoder to intern strings.
(on bool)
| 189 | |
| 190 | // UseInternedStrings causes the Encoder to intern strings. |
| 191 | func (e *Encoder) UseInternedStrings(on bool) { |
| 192 | if on { |
| 193 | e.flags |= useInternedStringsFlag |
| 194 | } else { |
| 195 | e.flags &= ^useInternedStringsFlag |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | func (e *Encoder) Encode(v interface{}) error { |
| 200 | switch v := v.(type) { |
no outgoing calls