()
| 140 | } |
| 141 | |
| 142 | private void requireCommaOrName () { |
| 143 | if ((current & isObject) != 0) { |
| 144 | if (!named) throw new IllegalStateException("Name must be set."); |
| 145 | named = false; |
| 146 | } else { |
| 147 | if ((current & needsComma) != 0) |
| 148 | buffer.append(','); |
| 149 | else if (current != none) // |
| 150 | current |= needsComma; |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | public JsonString name (String name) { |
| 155 | nameValue(name); |