public JsonBuilder valueNull() { JsonValue value = JsonNull.instance ; maybeObjectOrArray(value) ; return this ; }
public JsonBuilder value(JsonValue v) { maybeObjectOrArray(v) ; return this ; }
public JsonBuilder valueNull() { JsonValue value = JsonNull.instance ; maybeObjectOrArray(value) ; return this ; }
public JsonBuilder value(JsonValue v) { maybeObjectOrArray(v) ; return this ; }
public JsonBuilder value(BigDecimal decimal) { JsonValue value = JsonNumber.value(decimal) ; maybeObjectOrArray(value) ; return this ; }
public JsonBuilder value(boolean b) { JsonValue value = new JsonBoolean(b) ; maybeObjectOrArray(value) ; return this ; }
public JsonBuilder value(long val) { JsonValue value = JsonNumber.value(val) ; maybeObjectOrArray(value) ; return this ; }
public JsonBuilder value(long val) { JsonValue value = JsonNumber.value(val) ; maybeObjectOrArray(value) ; return this ; }
public JsonBuilder value(double d) { JsonValue value = JsonNumber.value(d) ; maybeObjectOrArray(value) ; return this ; }
public JsonBuilder value(String string) { JsonValue value = new JsonString(string) ; maybeObjectOrArray(value) ; return this ; } }
public JsonBuilder value(boolean b) { JsonValue value = new JsonBoolean(b) ; maybeObjectOrArray(value) ; return this ; }
public JsonBuilder value(String string) { JsonValue value = new JsonString(string) ; maybeObjectOrArray(value) ; return this ; } }
public JsonBuilder value(double d) { JsonValue value = JsonNumber.value(d) ; maybeObjectOrArray(value) ; return this ; }
public JsonBuilder value(BigDecimal decimal) { JsonValue value = JsonNumber.value(decimal) ; maybeObjectOrArray(value) ; return this ; }
public JsonBuilder finishArray() { if ( stack.isEmpty() ) throw new JsonException("Alignment error : already built outer most object or array") ; State state = stack.pop() ; if ( state != State.ARRAY ) throw new JsonException("JSON build error : not in an array") ; JsonValue value = arrays.pop() ; maybeObjectOrArray(value) ; if ( stack.isEmpty() ) builtValue = value ; return this ; }
public JsonBuilder finishArray() { if ( stack.isEmpty() ) throw new JsonException("Alignment error : already built outer-most object or array") ; State state = stack.pop() ; if ( state != State.ARRAY ) throw new JsonException("JSON build error : not in an array") ; JsonValue value = arrays.pop() ; maybeObjectOrArray(value) ; if ( stack.isEmpty() ) builtValue = value ; return this ; }
public JsonBuilder finishObject(String finishMarker) { if ( stack.isEmpty() ) throw new JsonException("Alignment error : already built outer-most object or array") ; State state = stack.pop() ; if ( state != State.OBJECT ) throw new JsonException("JSON build error : not in an object") ; JsonValue value = objects.pop() ; maybeObjectOrArray(value) ; if ( stack.isEmpty() ) builtValue = value ; String startMarker = markers.pop(); if ( ! Objects.equals(startMarker, finishMarker) ) throw new JsonException("JSON build error : start/finish alignment error: start="+startMarker+" finish="+finishMarker) ; return this ; }
public JsonBuilder finishObject(String finishMarker) { if ( stack.isEmpty() ) throw new JsonException("Alignment error : already built outer most object or array") ; State state = stack.pop() ; if ( state != State.OBJECT ) throw new JsonException("JSON build error : not in an object") ; JsonValue value = objects.pop() ; maybeObjectOrArray(value) ; if ( stack.isEmpty() ) builtValue = value ; String startMarker = markers.pop(); if ( ! Lib.equal(startMarker, finishMarker) ) throw new JsonException("JSON build error : start/finish alignment error: start="+startMarker+" finish="+finishMarker) ; return this ; }