Lines Matching refs:value

27  * encoded value to a stream, one token at a time. The stream includes both
38 * Write each of the array's elements with the appropriate {@link #value}
43 * {@link #name} with the property's value. Write property values with the
44 * appropriate {@link #value} method or by nesting other objects or arrays.
88 * writer.name("id").value(message.getId());
89 * writer.name("text").value(message.getText());
103 * writer.name("name").value(user.getName());
104 * writer.name("followers_count").value(user.getFollowersCount());
110 * for (Double value : doubles) {
111 * writer.value(value);
137 * The name/value separator; either ":" or ": ".
180 * value must be an object or an array.
265 * Returns the value on the top of the stack.
272 * Replace the value on the top of the stack with the given value.
281 * @param name the name of the forthcoming value. May not be null.
294 * Encodes {@code value}.
296 * @param value the literal string value, or null to encode a null literal.
299 public JsonWriter value(String value) throws IOException {
300 if (value == null) {
304 string(value);
320 * Encodes {@code value}.
324 public JsonWriter value(boolean value) throws IOException {
326 out.write(value ? "true" : "false");
331 * Encodes {@code value}.
333 * @param value a finite value. May not be {@link Double#isNaN() NaNs} or
337 public JsonWriter value(double value) throws IOException {
338 if (!lenient && (Double.isNaN(value) || Double.isInfinite(value))) {
339 throw new IllegalArgumentException("Numeric values must be finite, but was " + value);
342 out.append(Double.toString(value));
347 * Encodes {@code value}.
351 public JsonWriter value(long value) throws IOException {
353 out.write(Long.toString(value));
358 * Encodes {@code value}.
360 * @param value a finite value. May not be {@link Double#isNaN() NaNs} or
364 public JsonWriter value(Number value) throws IOException {
365 if (value == null) {
369 String string = value.toString();
372 throw new IllegalArgumentException("Numeric values must be finite, but was " + value);
400 private void string(String value) throws IOException {
402 for (int i = 0, length = value.length(); i < length; i++) {
403 char c = value.charAt(i);
474 * adjusts the stack to expect the name's value.
488 * Inserts any necessary separators and whitespace before a literal value,
492 * @param root true if the value is a new array or object, the two values
515 case DANGLING_NAME: // value for name
522 "JSON must have only one top-level value.");