Value adds a new element to the JSON Array. Returns a Value type that is used to encode the array element.
()
| 20 | // Returns a Value type that is used to encode |
| 21 | // the array element. |
| 22 | func (a *Array) Value() Value { |
| 23 | if a.writeComma { |
| 24 | a.w.WriteRune(comma) |
| 25 | } else { |
| 26 | a.writeComma = true |
| 27 | } |
| 28 | |
| 29 | return newValue(a.w, a.scratch) |
| 30 | } |
| 31 | |
| 32 | // Close encodes the end of the JSON Array |
| 33 | func (a *Array) Close() { |