Package javax.json.spi
Class JsonProvider
- java.lang.Object
-
- javax.json.spi.JsonProvider
-
@ProviderType public abstract class JsonProvider extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract JsonArrayBuilder
createArrayBuilder()
JsonArrayBuilder
createArrayBuilder(java.util.Collection<?> initialData)
JsonArrayBuilder
createArrayBuilder(JsonArray initialData)
abstract JsonBuilderFactory
createBuilderFactory(java.util.Map<java.lang.String,?> config)
JsonPatch
createDiff(JsonStructure source, JsonStructure target)
abstract JsonGenerator
createGenerator(java.io.OutputStream out)
abstract JsonGenerator
createGenerator(java.io.Writer writer)
abstract JsonGeneratorFactory
createGeneratorFactory(java.util.Map<java.lang.String,?> config)
JsonMergePatch
createMergeDiff(JsonValue source, JsonValue target)
Create a merge patch by comparing the source to the target.JsonMergePatch
createMergePatch(JsonValue patch)
Create a merge patch based on the given JsonValue.abstract JsonObjectBuilder
createObjectBuilder()
Create an empty JsonObjectBuilderJsonObjectBuilder
createObjectBuilder(java.util.Map<java.lang.String,java.lang.Object> map)
Creates a JSON object builder, initialized with the specified Map.JsonObjectBuilder
createObjectBuilder(JsonObject jsonObject)
Creates a JSON object builder, initialized with the specified JsonObject.abstract JsonParser
createParser(java.io.InputStream in)
abstract JsonParser
createParser(java.io.Reader reader)
abstract JsonParserFactory
createParserFactory(java.util.Map<java.lang.String,?> config)
JsonPatch
createPatch(JsonArray array)
JsonPatchBuilder
createPatchBuilder()
Create a new JsonPatchBuilderJsonPatchBuilder
createPatchBuilder(JsonArray initialData)
Create a new JsonPatchBuilder from initial data.JsonPointer
createPointer(java.lang.String path)
Create aJsonPointer
based on the given path stringabstract JsonReader
createReader(java.io.InputStream in)
abstract JsonReader
createReader(java.io.Reader reader)
abstract JsonReaderFactory
createReaderFactory(java.util.Map<java.lang.String,?> config)
JsonNumber
createValue(double value)
JsonNumber
createValue(int value)
JsonNumber
createValue(long value)
JsonString
createValue(java.lang.String value)
JsonNumber
createValue(java.math.BigDecimal value)
JsonNumber
createValue(java.math.BigInteger value)
abstract JsonWriter
createWriter(java.io.OutputStream out)
abstract JsonWriter
createWriter(java.io.Writer writer)
abstract JsonWriterFactory
createWriterFactory(java.util.Map<java.lang.String,?> config)
static JsonProvider
provider()
-
-
-
Method Detail
-
provider
public static JsonProvider provider()
-
createParser
public abstract JsonParser createParser(java.io.Reader reader)
-
createParser
public abstract JsonParser createParser(java.io.InputStream in)
-
createParserFactory
public abstract JsonParserFactory createParserFactory(java.util.Map<java.lang.String,?> config)
-
createGenerator
public abstract JsonGenerator createGenerator(java.io.Writer writer)
-
createGenerator
public abstract JsonGenerator createGenerator(java.io.OutputStream out)
-
createGeneratorFactory
public abstract JsonGeneratorFactory createGeneratorFactory(java.util.Map<java.lang.String,?> config)
-
createReader
public abstract JsonReader createReader(java.io.Reader reader)
-
createReader
public abstract JsonReader createReader(java.io.InputStream in)
-
createWriter
public abstract JsonWriter createWriter(java.io.Writer writer)
-
createWriter
public abstract JsonWriter createWriter(java.io.OutputStream out)
-
createWriterFactory
public abstract JsonWriterFactory createWriterFactory(java.util.Map<java.lang.String,?> config)
-
createReaderFactory
public abstract JsonReaderFactory createReaderFactory(java.util.Map<java.lang.String,?> config)
-
createObjectBuilder
public abstract JsonObjectBuilder createObjectBuilder()
Create an empty JsonObjectBuilder- Since:
- 1.0
-
createObjectBuilder
public JsonObjectBuilder createObjectBuilder(JsonObject jsonObject)
Creates a JSON object builder, initialized with the specified JsonObject.- Since:
- 1.1
-
createObjectBuilder
public JsonObjectBuilder createObjectBuilder(java.util.Map<java.lang.String,java.lang.Object> map)
Creates a JSON object builder, initialized with the specified Map.- Since:
- 1.1
-
createArrayBuilder
public abstract JsonArrayBuilder createArrayBuilder()
-
createArrayBuilder
public JsonArrayBuilder createArrayBuilder(JsonArray initialData)
-
createArrayBuilder
public JsonArrayBuilder createArrayBuilder(java.util.Collection<?> initialData)
-
createPointer
public JsonPointer createPointer(java.lang.String path)
Create aJsonPointer
based on the given path string- Since:
- 1.1
-
createBuilderFactory
public abstract JsonBuilderFactory createBuilderFactory(java.util.Map<java.lang.String,?> config)
-
createValue
public JsonString createValue(java.lang.String value)
-
createValue
public JsonNumber createValue(int value)
-
createValue
public JsonNumber createValue(long value)
-
createValue
public JsonNumber createValue(double value)
-
createValue
public JsonNumber createValue(java.math.BigDecimal value)
-
createValue
public JsonNumber createValue(java.math.BigInteger value)
-
createPatch
public JsonPatch createPatch(JsonArray array)
- Parameters:
array
- with the patch operations- Returns:
- the JsonPatch based on the given operations
- Since:
- 1.1
- See Also:
createDiff(JsonStructure, JsonStructure)
-
createDiff
public JsonPatch createDiff(JsonStructure source, JsonStructure target)
Create aJsonPatch
by comparing the source to the target as defined in RFC-6902. Applying thisJsonPatch
to the source you will give you the target.- Since:
- 1.1
- See Also:
createPatch(JsonArray)
-
createPatchBuilder
public JsonPatchBuilder createPatchBuilder()
Create a new JsonPatchBuilder- Since:
- 1.1
-
createPatchBuilder
public JsonPatchBuilder createPatchBuilder(JsonArray initialData)
Create a new JsonPatchBuilder from initial data.- Parameters:
initialData
- the initial patch operations- Since:
- 1.1
-
createMergePatch
public JsonMergePatch createMergePatch(JsonValue patch)
Create a merge patch based on the given JsonValue. If you have the following JsonMergePatch:{ "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", } }
- Since:
- 1.1
- See Also:
createMergeDiff(JsonValue, JsonValue)
-
createMergeDiff
public JsonMergePatch createMergeDiff(JsonValue source, JsonValue target)
Create a merge patch by comparing the source to the target. Applying this JsonMergePatch to the source will give you the target. A MergePatch is a JsonValue as defined in http://tools.ietf.org/html/rfc7396 If you have a JSON like{ "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 } }
- Since:
- 1.1
- See Also:
createMergePatch(JsonValue)
-
-