public class JsonProviderImpl extends JsonProvider
| Constructor | Description |
|---|---|
JsonProviderImpl() |
| Modifier and Type | Method | Description |
|---|---|---|
JsonArrayBuilder |
createArrayBuilder() |
Creates a JSON array builder.
|
JsonArrayBuilder |
createArrayBuilder(Collection<?> collection) |
Creates a JSON array builder, initialized with the content of specified
collection. |
JsonArrayBuilder |
createArrayBuilder(JsonArray array) |
Creates a JSON array builder, initialized with the specified array.
|
JsonBuilderFactory |
createBuilderFactory(Map<String,?> config) |
Creates a builder factory for creating
JsonArrayBuilder
and JsonObjectBuilder objects. |
JsonPatch |
createDiff(JsonStructure source,
JsonStructure target) |
Generates a JSON Patch (RFC 6902)
from the source and target
JsonStructure. |
JsonGenerator |
createGenerator(OutputStream out) |
Creates a JSON generator for writing JSON text to a byte stream.
|
JsonGenerator |
createGenerator(Writer writer) |
Creates a JSON generator for writing JSON text to a character stream.
|
JsonGeneratorFactory |
createGeneratorFactory(Map<String,?> config) |
Creates a generator factory for creating
JsonGenerator instances. |
JsonMergePatch |
createMergeDiff(JsonValue source,
JsonValue target) |
Generates a JSON Merge Patch (RFC 7396)
from the source and target
JsonValues
which when applied to the source, yields the target. |
JsonMergePatch |
createMergePatch(JsonValue patch) |
Creates JSON Merge Patch (RFC 7396)
from specified
JsonValue. |
JsonObjectBuilder |
createObjectBuilder() |
Creates a JSON object builder.
|
JsonObjectBuilder |
createObjectBuilder(Map<String,Object> map) |
Creates a JSON object builder, initialized with the data from specified
map. |
JsonObjectBuilder |
createObjectBuilder(JsonObject object) |
Creates a JSON object builder, initialized with the specified object.
|
JsonParser |
createParser(InputStream in) |
Creates a JSON parser from the specified byte stream.
|
JsonParser |
createParser(Reader reader) |
Creates a JSON parser from a character stream.
|
JsonParserFactory |
createParserFactory(Map<String,?> config) |
Creates a parser factory for creating
JsonParser instances. |
JsonPatch |
createPatch(JsonArray array) |
Creates a JSON Patch (RFC 6902)
from the specified operations.
|
JsonPatchBuilder |
createPatchBuilder() |
Creates a JSON Patch builder (RFC 6902).
|
JsonPatchBuilder |
createPatchBuilder(JsonArray array) |
Creates a JSON Patch builder
(RFC 6902),
initialized with the specified operations.
|
JsonPointer |
createPointer(String jsonPointer) |
Creates JSON Pointer (RFC 6901)
from given
jsonPointer string. |
JsonReader |
createReader(InputStream in) |
Creates a JSON reader from a byte stream.
|
JsonReader |
createReader(Reader reader) |
Creates a JSON reader from a character stream.
|
JsonReaderFactory |
createReaderFactory(Map<String,?> config) |
Creates a reader factory for creating
JsonReader objects. |
JsonNumber |
createValue(double value) |
Creates a JsonNumber.
|
JsonNumber |
createValue(int value) |
Creates a JsonNumber.
|
JsonNumber |
createValue(long value) |
Creates a JsonNumber.
|
JsonString |
createValue(String value) |
Creates a JsonString.
|
JsonNumber |
createValue(BigDecimal value) |
Creates a JsonNumber.
|
JsonNumber |
createValue(BigInteger value) |
Creates a JsonNumber.
|
JsonWriter |
createWriter(OutputStream out) |
|
JsonWriter |
createWriter(Writer writer) |
|
JsonWriterFactory |
createWriterFactory(Map<String,?> config) |
Creates a writer factory for creating
JsonWriter objects. |
providerpublic JsonGenerator createGenerator(Writer writer)
JsonProvidercreateGenerator in class JsonProviderwriter - a i/o writer to which JSON is writtenpublic JsonGenerator createGenerator(OutputStream out)
JsonProvidercreateGenerator in class JsonProviderout - i/o stream to which JSON is writtenpublic JsonParser createParser(Reader reader)
JsonProvidercreateParser in class JsonProviderreader - i/o reader from which JSON is to be readpublic JsonParser createParser(InputStream in)
JsonProvidercreateParser in class JsonProviderin - i/o stream from which JSON is to be readpublic JsonParserFactory createParserFactory(Map<String,?> config)
JsonProviderJsonParser instances.
The factory is configured with the specified map of
provider specific configuration properties. Provider implementations
should ignore any unsupported configuration properties specified in
the map.createParserFactory in class JsonProviderconfig - a map of provider specific properties to configure the
JSON parsers. The map may be empty or nullpublic JsonGeneratorFactory createGeneratorFactory(Map<String,?> config)
JsonProviderJsonGenerator instances.
The factory is configured with the specified map of provider specific
configuration properties. Provider implementations should
ignore any unsupported configuration properties specified in the map.createGeneratorFactory in class JsonProviderconfig - a map of provider specific properties to configure the
JSON generators. The map may be empty or nullpublic JsonReader createReader(Reader reader)
JsonProvidercreateReader in class JsonProviderreader - a reader from which JSON is to be readpublic JsonReader createReader(InputStream in)
JsonProvidercreateReader in class JsonProviderin - a byte stream from which JSON is to be readpublic JsonWriter createWriter(Writer writer)
JsonProvidercreateWriter in class JsonProviderwriter - to which JSON object or array is writtenpublic JsonWriter createWriter(OutputStream out)
JsonProviderobject or array
structure to the specified byte stream. Characters written to
the stream are encoded into bytes using UTF-8 encoding.createWriter in class JsonProviderout - to which JSON object or array is writtenpublic JsonWriterFactory createWriterFactory(Map<String,?> config)
JsonProviderJsonWriter objects.
The factory is configured with the specified map of provider specific
configuration properties. Provider implementations should ignore any
unsupported configuration properties specified in the map.createWriterFactory in class JsonProviderconfig - a map of provider specific properties to configure the
JSON writers. The map may be empty or nullpublic JsonReaderFactory createReaderFactory(Map<String,?> config)
JsonProviderJsonReader objects.
The factory is configured with the specified map of provider specific
configuration properties. Provider implementations should ignore any
unsupported configuration properties specified in the map.createReaderFactory in class JsonProviderconfig - a map of provider specific properties to configure the
JSON readers. The map may be empty or nullpublic JsonObjectBuilder createObjectBuilder()
JsonProvidercreateObjectBuilder in class JsonProviderpublic JsonObjectBuilder createObjectBuilder(JsonObject object)
JsonProvidercreateObjectBuilder in class JsonProviderobject - the initial JSON object in the builderpublic JsonObjectBuilder createObjectBuilder(Map<String,Object> map)
JsonProvidermap.
If the @{code map} contains Optionals then resulting JSON object builder
contains the key from the map only if the Optional is not empty.createObjectBuilder in class JsonProvidermap - the initial object in the builderpublic JsonArrayBuilder createArrayBuilder()
JsonProvidercreateArrayBuilder in class JsonProviderpublic JsonArrayBuilder createArrayBuilder(JsonArray array)
JsonProvidercreateArrayBuilder in class JsonProviderarray - the initial JSON array in the builderpublic JsonArrayBuilder createArrayBuilder(Collection<?> collection)
JsonProvidercollection.
If the @{code collection} contains Optionals then resulting JSON array builder
contains the value from the collection only if the Optional is not empty.createArrayBuilder in class JsonProvidercollection - the initial data for the builderpublic JsonPointer createPointer(String jsonPointer)
JsonProviderjsonPointer string.
jsonPointer string defines a reference to the target itself.jsonPointer string is non-empty, it must be a sequence of '/' prefixed tokens.createPointer in class JsonProviderjsonPointer - the JSON Pointer stringpublic JsonPatchBuilder createPatchBuilder()
JsonProvidercreatePatchBuilder in class JsonProviderpublic JsonPatchBuilder createPatchBuilder(JsonArray array)
JsonProvidercreatePatchBuilder in class JsonProviderarray - the initial patch operationspublic JsonPatch createPatch(JsonArray array)
JsonProvidercreatePatch in class JsonProviderarray - patch operationspublic JsonPatch createDiff(JsonStructure source, JsonStructure target)
JsonProviderJsonStructure.
The generated JSON Patch need not be unique.createDiff in class JsonProvidersource - the sourcetarget - the target, must be the same type as the sourcepublic JsonMergePatch createMergePatch(JsonValue patch)
JsonProviderJsonValue.createMergePatch in class JsonProviderpatch - the patchpublic JsonMergePatch createMergeDiff(JsonValue source, JsonValue target)
JsonProviderJsonValues
which when applied to the source, yields the target.createMergeDiff in class JsonProvidersource - the sourcetarget - the targetpublic JsonString createValue(String value)
JsonProvidercreateValue in class JsonProvidervalue - a JSON stringpublic JsonNumber createValue(int value)
JsonProvidercreateValue in class JsonProvidervalue - a JSON numberpublic JsonNumber createValue(long value)
JsonProvidercreateValue in class JsonProvidervalue - a JSON numberpublic JsonNumber createValue(double value)
JsonProvidercreateValue in class JsonProvidervalue - a JSON numberpublic JsonNumber createValue(BigInteger value)
JsonProvidercreateValue in class JsonProvidervalue - a JSON numberpublic JsonNumber createValue(BigDecimal value)
JsonProvidercreateValue in class JsonProvidervalue - a JSON numberpublic JsonBuilderFactory createBuilderFactory(Map<String,?> config)
JsonProviderJsonArrayBuilder
and JsonObjectBuilder objects.
The factory is configured with the specified map of provider specific
configuration properties. Provider implementations should ignore any
unsupported configuration properties specified in the map.createBuilderFactory in class JsonProviderconfig - a map of provider specific properties to configure the
JSON builders. The map may be empty or nullCopyright © 2017 Oracle. All rights reserved.