-
- 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
Modifier and Type Method Description final JSONIntof(Integer value)final JSONLongof(Long value)final JSONDecimalof(BigDecimal value)final JSONStringof(String value)final JSONBooleanof(Boolean value)final JSONArrayof(JSONValue items)final JSONObjectof(Pair<String, JSONValue> items)final JSONValueparse(String json)final JSONValueparseNonNull(String json)final JSONArrayparseArray(String json)final JSONObjectparseObject(String json)final StringtoJSON(JSONValue $self)final UnitappendTo(JSONValue $self, Appendable a)final Unitoutput(JSONValue $self, IntConsumer out)final UnitcoOutput(JSONValue $self, SuspendFunction1<Character, Unit> out)final AppendableappendJSONValue(Appendable $self, JSONValue json)final StringdisplayValue(JSONValue $self, Integer maxString)final StringelidedValue(JSONValue $self, Collection<String> exclude, Collection<String> include, String substitute)final Unitaccept(IntConsumer $self, CharSequence cs)final StringgetAsString(JSONValue $self)final StringgetAsStringOrNull(JSONValue $self)final LonggetAsLong(JSONValue $self)final LonggetAsLongOrNull(JSONValue $self)final IntegergetAsInt(JSONValue $self)final IntegergetAsIntOrNull(JSONValue $self)final ShortgetAsShort(JSONValue $self)final ShortgetAsShortOrNull(JSONValue $self)final BytegetAsByte(JSONValue $self)final BytegetAsByteOrNull(JSONValue $self)final ULonggetAsULong(JSONValue $self)final ULonggetAsULongOrNull(JSONValue $self)final UIntgetAsUInt(JSONValue $self)final UIntgetAsUIntOrNull(JSONValue $self)final UShortgetAsUShort(JSONValue $self)final UShortgetAsUShortOrNull(JSONValue $self)final UBytegetAsUByte(JSONValue $self)final UBytegetAsUByteOrNull(JSONValue $self)final BigDecimalgetAsDecimal(JSONValue $self)final BigDecimalgetAsDecimalOrNull(JSONValue $self)final BooleangetAsBoolean(JSONValue $self)final BooleangetAsBooleanOrNull(JSONValue $self)final JSONArraygetAsArray(JSONValue $self)final JSONArraygetAsArrayOrNull(JSONValue $self)final JSONObjectgetAsObject(JSONValue $self)final JSONObjectgetAsObjectOrNull(JSONValue $self)-
-
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)
-
coOutput
final Unit coOutput(JSONValue $self, SuspendFunction1<Character, Unit> 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)
-
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)
-
-
-
-