Package | Description |
---|---|
com.cedarsoftware.util.io |
Modifier and Type | Method and Description |
---|---|
ReadOptions |
ReadOptionsBuilder.build() |
ReadOptions |
ReadOptions.ensureUsingMaps() |
ReadOptions |
ReadOptions.ensureUsingObjects() |
ReadOptions |
ReaderContext.getReadOptions() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
JsonIo.deepCopy(Object source,
ReadOptions readOptions,
WriteOptions writeOptions)
Copy an object graph using JSON.
|
static String |
JsonIo.formatJson(String json,
ReadOptions readOptions,
WriteOptions writeOptions)
Format the passed in JSON into multi-line, indented format, commonly used in JSON online editors.
|
static JsonObject |
JsonIo.toJsonValues(InputStream inputStream,
ReadOptions readOptions)
Note that the return type will match one of these JSON types: JsonObject, JsonArray, or JsonPrimitive, all
of which implement JsonValue.
|
static JsonObject |
JsonIo.toJsonValues(String json,
ReadOptions readOptions)
Note that the return type will match one of these JSON types: JsonObject, JsonArray, or JsonPrimitive, all
of which implement JsonValue.
|
static <T> T |
JsonReader.toMaps(InputStream inputStream,
ReadOptions readOptions)
Note that the return type will match one of these JSON types (array, Map, string, long, boolean, or null).
|
static <T> T |
JsonReader.toMaps(String json,
ReadOptions readOptions)
Note that the return type will match one of these JSON types (array, Map, string, long, boolean, or null).
|
static <T> T |
JsonReader.toObjects(InputStream input,
ReadOptions options,
Class<?> root)
Convert the passed in JSON string into a Java object graph.
|
static <T> T |
JsonIo.toObjects(InputStream in,
ReadOptions readOptions,
Class<T> rootType)
Convert the passed in JSON to Java Objects.
|
static <T> T |
JsonReader.toObjects(String jsonString,
ReadOptions options,
Class<?> root)
Convert the passed in JSON string into a Java object graph.
|
static <T> T |
JsonIo.toObjects(String json,
ReadOptions readOptions,
Class<T> rootType)
Convert the passed in JSON to Java Objects.
|
Constructor and Description |
---|
JsonReader(InputStream input,
ReadOptions readOptions)
Creates a json reader using custom read options
|
JsonReader(InputStream input,
ReadOptions readOptions,
ReferenceTracker references) |
JsonReader(ReadOptions readOptions)
Use this constructor if you already have a JsonObject graph and want to parse it into
Java objects by calling jsonReader.jsonObjectsToJava(rootJsonObject) after constructing
the JsonReader.
|
JsonReader(String json,
ReadOptions readOptions)
Creates a json reader using custom read options
|
MapResolver(ReadOptions readOptions,
ReferenceTracker references) |
ObjectResolver(ReadOptions readOptions,
ReferenceTracker references)
Constructor
|
Resolver(ReadOptions readOptions,
ReferenceTracker references) |
Copyright © 2023. All rights reserved.