-
- All Implemented Interfaces:
public class JSONJSON core library - a set of functions to assist with the creation and output of JSON data.
-
-
Field Summary
Fields Modifier and Type Field Description private final StringasStringprivate final StringasStringOrNullprivate final LongasLongprivate final LongasLongOrNullprivate final IntegerasIntprivate final IntegerasIntOrNullprivate final ShortasShortprivate final ShortasShortOrNullprivate final ByteasByteprivate final ByteasByteOrNullprivate final ULongasULongprivate final ULongasULongOrNullprivate final UIntasUIntprivate final UIntasUIntOrNullprivate final UShortasUShortprivate final UShortasUShortOrNullprivate final UByteasUByteprivate final UByteasUByteOrNullprivate final BigDecimalasDecimalprivate final BigDecimalasDecimalOrNullprivate final BooleanasBooleanprivate final BooleanasBooleanOrNullprivate final JSONArrayasArrayprivate final JSONArrayasArrayOrNullprivate final JSONObjectasObjectprivate final JSONObjectasObjectOrNullpublic final static JSONINSTANCE
-
Method Summary
-
-
Method Detail
-
of
final JSONDecimal of(BigDecimal value)
-
of
final JSONString of(String value)
-
of
final JSONBoolean of(Boolean value)
-
of
final JSONObject of(Pair<String, JSONValue> items)
-
parseNonNull
final JSONValue parseNonNull(String json)
-
parseArray
final JSONArray parseArray(String json)
-
parseObject
final JSONObject parseObject(String json)
-
parseLines
final JSONArray parseLines(String jsonLines)
-
appendTo
final Unit appendTo(JSONValue $self, Appendable a)
-
output
final Unit output(JSONValue $self, IntConsumer out)
-
appendJSONValue
final Appendable appendJSONValue(Appendable $self, JSONValue json)
-
displayValue
final String displayValue(JSONValue $self, Integer maxString)
-
elidedValue
final String elidedValue(JSONValue $self, Collection<String> exclude, Collection<String> include, String substitute)
-
asStringOrError
final String asStringOrError(JSONValue $self, String target, Object key, String nodeName)
-
asIntOrError
final Integer asIntOrError(JSONValue $self, String target, Object key, String nodeName)
-
asShortOrError
final Short asShortOrError(JSONValue $self, String target, Object key, String nodeName)
-
asULongOrError
final ULong asULongOrError(JSONValue $self, String target, Object key, String nodeName)
-
asUShortOrError
final UShort asUShortOrError(JSONValue $self, String target, Object key, String nodeName)
-
asUByteOrError
final UByte asUByteOrError(JSONValue $self, String target, Object key, String nodeName)
-
asDecimalOrError
final BigDecimal asDecimalOrError(JSONValue $self, String target, Object key, String nodeName)
-
asBooleanOrError
final Boolean asBooleanOrError(JSONValue $self, String target, Object key, String nodeName)
-
asArrayOrError
final JSONArray asArrayOrError(JSONValue $self, String target, Object key, String nodeName)
-
asObjectOrError
final JSONObject asObjectOrError(JSONValue $self, String target, Object key, String nodeName)
-
accept
final Unit accept(IntConsumer $self, CharSequence cs)
-
getAsString
final String getAsString(JSONValue $self)
-
getAsStringOrNull
final String getAsStringOrNull(JSONValue $self)
-
getAsLongOrNull
final Long getAsLongOrNull(JSONValue $self)
-
getAsIntOrNull
final Integer getAsIntOrNull(JSONValue $self)
-
getAsShort
final Short getAsShort(JSONValue $self)
-
getAsShortOrNull
final Short getAsShortOrNull(JSONValue $self)
-
getAsByteOrNull
final Byte getAsByteOrNull(JSONValue $self)
-
getAsULong
final ULong getAsULong(JSONValue $self)
-
getAsULongOrNull
final ULong getAsULongOrNull(JSONValue $self)
-
getAsUIntOrNull
final UInt getAsUIntOrNull(JSONValue $self)
-
getAsUShort
final UShort getAsUShort(JSONValue $self)
-
getAsUShortOrNull
final UShort getAsUShortOrNull(JSONValue $self)
-
getAsUByte
final UByte getAsUByte(JSONValue $self)
-
getAsUByteOrNull
final UByte getAsUByteOrNull(JSONValue $self)
-
getAsDecimal
final BigDecimal getAsDecimal(JSONValue $self)
-
getAsDecimalOrNull
final BigDecimal getAsDecimalOrNull(JSONValue $self)
-
getAsBoolean
final Boolean getAsBoolean(JSONValue $self)
-
getAsBooleanOrNull
final Boolean getAsBooleanOrNull(JSONValue $self)
-
getAsArray
final JSONArray getAsArray(JSONValue $self)
-
getAsArrayOrNull
final JSONArray getAsArrayOrNull(JSONValue $self)
-
getAsObject
final JSONObject getAsObject(JSONValue $self)
-
getAsObjectOrNull
final JSONObject getAsObjectOrNull(JSONValue $self)
-
-
-
-