Class JsonProviderImpl
java.lang.Object
javax.json.spi.JsonProvider
org.glassfish.json.JsonProviderImpl
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a JSON array builder.createArrayBuilder(Collection<?> collection) Creates a JSON array builder, initialized with the content of specifiedcollection.createArrayBuilder(JsonArray array) Creates a JSON array builder, initialized with the specified array.createBuilderFactory(Map<String, ?> config) Creates a builder factory for creatingJsonArrayBuilderandJsonObjectBuilderobjects.createDiff(JsonStructure source, JsonStructure target) Generates a JSON Patch (RFC 6902) from the source and targetJsonStructure.Creates a JSON generator for writing JSON text to a byte stream.createGenerator(Writer writer) Creates a JSON generator for writing JSON text to a character stream.createGeneratorFactory(Map<String, ?> config) Creates a generator factory for creatingJsonGeneratorinstances.createMergeDiff(JsonValue source, JsonValue target) Generates a JSON Merge Patch (RFC 7396) from the source and targetJsonValues which when applied to thesource, yields thetarget.createMergePatch(JsonValue patch) Creates JSON Merge Patch (RFC 7396) from specifiedJsonValue.Creates a JSON object builder.createObjectBuilder(Map<String, Object> map) Creates a JSON object builder, initialized with the data from specifiedmap.createObjectBuilder(JsonObject object) Creates a JSON object builder, initialized with the specified object.Creates a JSON parser from the specified byte stream.createParser(Reader reader) Creates a JSON parser from a character stream.createParserFactory(Map<String, ?> config) Creates a parser factory for creatingJsonParserinstances.createPatch(JsonArray array) Creates a JSON Patch (RFC 6902) from the specified operations.Creates a JSON Patch builder (RFC 6902).createPatchBuilder(JsonArray array) Creates a JSON Patch builder (RFC 6902), initialized with the specified operations.createPointer(String jsonPointer) Creates JSON Pointer (RFC 6901) from givenjsonPointerstring.Creates a JSON reader from a byte stream.createReader(Reader reader) Creates a JSON reader from a character stream.createReaderFactory(Map<String, ?> config) Creates a reader factory for creatingJsonReaderobjects.createValue(double value) Creates a JsonNumber.createValue(int value) Creates a JsonNumber.createValue(long value) Creates a JsonNumber.createValue(String value) Creates a JsonString.createValue(BigDecimal value) Creates a JsonNumber.createValue(BigInteger value) Creates a JsonNumber.createWriter(OutputStream out) createWriter(Writer writer) createWriterFactory(Map<String, ?> config) Creates a writer factory for creatingJsonWriterobjects.(package private) static booleanisPrettyPrintingEnabled(Map<String, ?> config) Methods inherited from class JsonProvider
provider
-
Field Details
-
bufferPool
-
-
Constructor Details
-
JsonProviderImpl
public JsonProviderImpl()
-
-
Method Details
-
createGenerator
Description copied from class:JsonProviderCreates a JSON generator for writing JSON text to a character stream.- Specified by:
createGeneratorin classJsonProvider- Parameters:
writer- a i/o writer to which JSON is written- Returns:
- a JSON generator
-
createGenerator
Description copied from class:JsonProviderCreates a JSON generator for writing JSON text to a byte stream.- Specified by:
createGeneratorin classJsonProvider- Parameters:
out- i/o stream to which JSON is written- Returns:
- a JSON generator
-
createParser
Description copied from class:JsonProviderCreates a JSON parser from a character stream.- Specified by:
createParserin classJsonProvider- Parameters:
reader- i/o reader from which JSON is to be read- Returns:
- a JSON parser
-
createParser
Description copied from class:JsonProviderCreates a JSON parser from the specified byte stream. The character encoding of the stream is determined as defined in RFC 7159 .- Specified by:
createParserin classJsonProvider- Parameters:
in- i/o stream from which JSON is to be read- Returns:
- a JSON parser
-
createParserFactory
Description copied from class:JsonProviderCreates a parser factory for creatingJsonParserinstances. 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.- Specified by:
createParserFactoryin classJsonProvider- Parameters:
config- a map of provider specific properties to configure the JSON parsers. The map may be empty or null- Returns:
- a JSON parser factory
-
createGeneratorFactory
Description copied from class:JsonProviderCreates a generator factory for creatingJsonGeneratorinstances. 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.- Specified by:
createGeneratorFactoryin classJsonProvider- Parameters:
config- a map of provider specific properties to configure the JSON generators. The map may be empty or null- Returns:
- a JSON generator factory
-
createReader
Description copied from class:JsonProviderCreates a JSON reader from a character stream.- Specified by:
createReaderin classJsonProvider- Parameters:
reader- a reader from which JSON is to be read- Returns:
- a JSON reader
-
createReader
Description copied from class:JsonProviderCreates a JSON reader from a byte stream. The character encoding of the stream is determined as described in RFC 7159.- Specified by:
createReaderin classJsonProvider- Parameters:
in- a byte stream from which JSON is to be read- Returns:
- a JSON reader
-
createWriter
Description copied from class:JsonProvider- Specified by:
createWriterin classJsonProvider- Parameters:
writer- to which JSON object or array is written- Returns:
- a JSON writer
-
createWriter
Description copied from class:JsonProviderCreates a JSON writer to write a JSONobjectorarraystructure to the specified byte stream. Characters written to the stream are encoded into bytes using UTF-8 encoding.- Specified by:
createWriterin classJsonProvider- Parameters:
out- to which JSON object or array is written- Returns:
- a JSON writer
-
createWriterFactory
Description copied from class:JsonProviderCreates a writer factory for creatingJsonWriterobjects. 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.- Specified by:
createWriterFactoryin classJsonProvider- Parameters:
config- a map of provider specific properties to configure the JSON writers. The map may be empty or null- Returns:
- a JSON writer factory
-
createReaderFactory
Description copied from class:JsonProviderCreates a reader factory for creatingJsonReaderobjects. 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.- Specified by:
createReaderFactoryin classJsonProvider- Parameters:
config- a map of provider specific properties to configure the JSON readers. The map may be empty or null- Returns:
- a JSON reader factory
-
createObjectBuilder
Description copied from class:JsonProviderCreates a JSON object builder.- Specified by:
createObjectBuilderin classJsonProvider- Returns:
- a JSON object builder
-
createObjectBuilder
Description copied from class:JsonProviderCreates a JSON object builder, initialized with the specified object.- Overrides:
createObjectBuilderin classJsonProvider- Parameters:
object- the initial JSON object in the builder- Returns:
- a JSON object builder
-
createObjectBuilder
Description copied from class:JsonProviderCreates a JSON object builder, initialized with the data from specifiedmap. If the @{code map} containsOptionals then resulting JSON object builder contains the key from themaponly if theOptionalis not empty.- Overrides:
createObjectBuilderin classJsonProvider- Parameters:
map- the initial object in the builder- Returns:
- a JSON object builder
-
createArrayBuilder
Description copied from class:JsonProviderCreates a JSON array builder.- Specified by:
createArrayBuilderin classJsonProvider- Returns:
- a JSON array builder
-
createArrayBuilder
Description copied from class:JsonProviderCreates a JSON array builder, initialized with the specified array.- Overrides:
createArrayBuilderin classJsonProvider- Parameters:
array- the initial JSON array in the builder- Returns:
- a JSON array builder
-
createArrayBuilder
Description copied from class:JsonProviderCreates a JSON array builder, initialized with the content of specifiedcollection. If the @{code collection} containsOptionals then resulting JSON array builder contains the value from thecollectiononly if theOptionalis not empty.- Overrides:
createArrayBuilderin classJsonProvider- Parameters:
collection- the initial data for the builder- Returns:
- a JSON array builder
-
createPointer
Description copied from class:JsonProviderCreates JSON Pointer (RFC 6901) from givenjsonPointerstring.- An empty
jsonPointerstring defines a reference to the target itself. - If the
jsonPointerstring is non-empty, it must be a sequence of '/' prefixed tokens.
- Overrides:
createPointerin classJsonProvider- Parameters:
jsonPointer- the JSON Pointer string- Returns:
- a JSON Pointer
- An empty
-
createPatchBuilder
Description copied from class:JsonProviderCreates a JSON Patch builder (RFC 6902).- Overrides:
createPatchBuilderin classJsonProvider- Returns:
- a JSON Patch builder
-
createPatchBuilder
Description copied from class:JsonProviderCreates a JSON Patch builder (RFC 6902), initialized with the specified operations.- Overrides:
createPatchBuilderin classJsonProvider- Parameters:
array- the initial patch operations- Returns:
- a JSON Patch builder
-
createPatch
Description copied from class:JsonProviderCreates a JSON Patch (RFC 6902) from the specified operations.- Overrides:
createPatchin classJsonProvider- Parameters:
array- patch operations- Returns:
- a JSON Patch
-
createDiff
Description copied from class:JsonProviderGenerates a JSON Patch (RFC 6902) from the source and targetJsonStructure. The generated JSON Patch need not be unique.- Overrides:
createDiffin classJsonProvider- Parameters:
source- the sourcetarget- the target, must be the same type as the source- Returns:
- a JSON Patch which when applied to the source, yields the target
-
createMergePatch
Description copied from class:JsonProviderCreates JSON Merge Patch (RFC 7396) from specifiedJsonValue.- Overrides:
createMergePatchin classJsonProvider- Parameters:
patch- the patch- Returns:
- a JSON Merge Patch
-
createMergeDiff
Description copied from class:JsonProviderGenerates a JSON Merge Patch (RFC 7396) from the source and targetJsonValues which when applied to thesource, yields thetarget.- Overrides:
createMergeDiffin classJsonProvider- Parameters:
source- the sourcetarget- the target- Returns:
- a JSON Merge Patch
-
createValue
Description copied from class:JsonProviderCreates a JsonString.- Overrides:
createValuein classJsonProvider- Parameters:
value- a JSON string- Returns:
- the JsonString for the string
-
createValue
Description copied from class:JsonProviderCreates a JsonNumber.- Overrides:
createValuein classJsonProvider- Parameters:
value- a JSON number- Returns:
- the JsonNumber for the number
-
createValue
Description copied from class:JsonProviderCreates a JsonNumber.- Overrides:
createValuein classJsonProvider- Parameters:
value- a JSON number- Returns:
- the JsonNumber for the number
-
createValue
Description copied from class:JsonProviderCreates a JsonNumber.- Overrides:
createValuein classJsonProvider- Parameters:
value- a JSON number- Returns:
- the JsonNumber for the number
-
createValue
Description copied from class:JsonProviderCreates a JsonNumber.- Overrides:
createValuein classJsonProvider- Parameters:
value- a JSON number- Returns:
- the JsonNumber for the number
-
createValue
Description copied from class:JsonProviderCreates a JsonNumber.- Overrides:
createValuein classJsonProvider- Parameters:
value- a JSON number- Returns:
- the JsonNumber for the number
-
createBuilderFactory
Description copied from class:JsonProviderCreates a builder factory for creatingJsonArrayBuilderandJsonObjectBuilderobjects. 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.- Specified by:
createBuilderFactoryin classJsonProvider- Parameters:
config- a map of provider specific properties to configure the JSON builders. The map may be empty or null- Returns:
- a JSON builder factory
-
isPrettyPrintingEnabled
-