@ProviderType public abstract class JsonProvider extends Object
public static JsonProvider provider()
public abstract JsonParser createParser(Reader reader)
public abstract JsonParser createParser(InputStream in)
public abstract JsonParserFactory createParserFactory(Map<String,?> config)
public abstract JsonGenerator createGenerator(Writer writer)
public abstract JsonGenerator createGenerator(OutputStream out)
public abstract JsonGeneratorFactory createGeneratorFactory(Map<String,?> config)
public abstract JsonReader createReader(Reader reader)
public abstract JsonReader createReader(InputStream in)
public abstract JsonWriter createWriter(Writer writer)
public abstract JsonWriter createWriter(OutputStream out)
public abstract JsonWriterFactory createWriterFactory(Map<String,?> config)
public abstract JsonReaderFactory createReaderFactory(Map<String,?> config)
public abstract JsonObjectBuilder createObjectBuilder()
public JsonObjectBuilder createObjectBuilder(JsonObject jsonObject)
public JsonObjectBuilder createObjectBuilder(Map<String,Object> map)
public abstract JsonArrayBuilder createArrayBuilder()
public JsonArrayBuilder createArrayBuilder(JsonArray initialData)
public JsonArrayBuilder createArrayBuilder(Collection<?> initialData)
public JsonPointer createPointer(String path)
JsonPointer based on the given path stringpublic abstract JsonBuilderFactory createBuilderFactory(Map<String,?> config)
public JsonString createValue(String value)
public JsonNumber createValue(int value)
public JsonNumber createValue(long value)
public JsonNumber createValue(double value)
public JsonNumber createValue(BigDecimal value)
public JsonNumber createValue(BigInteger value)
public JsonPatch createPatch(JsonArray array)
array - with the patch operationscreateDiff(JsonStructure, JsonStructure)public JsonPatch createDiff(JsonStructure source, JsonStructure target)
JsonPatch by comparing the source to the target as defined in
RFC-6902.
Applying this JsonPatch to the source you will give you the target.createPatch(JsonArray)public JsonPatchBuilder createPatchBuilder()
public JsonPatchBuilder createPatchBuilder(JsonArray initialData)
initialData - the initial patch operationspublic JsonMergePatch createMergePatch(JsonValue patch)
{
"a":"z",
"c": {
"f": null
}
}
and apply it to the following JSON
{
"a": "b",
"c": {
"d": "e",
"f": "g"
}
}
you will get the following result:
{
"a": "z",
"c": {
"d": "e",
}
}
createMergeDiff(JsonValue, JsonValue)public JsonMergePatch createMergeDiff(JsonValue source, JsonValue target)
{
"a": "b",
"c": {
"d": "e",
"f": "g"
}
}
and comparing it with
{
"a": "z",
"c": {
"d": "e",
}
}
you will get the following JsonMergePatch:
{
"a":"z",
"c": {
"f": null
}
}
createMergePatch(JsonValue)Copyright © 2010 - 2020 Adobe. All Rights Reserved