()
| 281 | var encodeStatePool sync.Pool |
| 282 | |
| 283 | func newEncodeState() *encodeState { |
| 284 | if v := encodeStatePool.Get(); v != nil { |
| 285 | e := v.(*encodeState) |
| 286 | e.Reset() |
| 287 | return e |
| 288 | } |
| 289 | return new(encodeState) |
| 290 | } |
| 291 | |
| 292 | // jsonError is an error wrapper type for internal use only. |
| 293 | // Panics with errors are wrapped in jsonError so that the top-level recover |