Package org.apache.johnzon.core
Class JsonProviderImpl
- java.lang.Object
-
- jakarta.json.spi.JsonProvider
-
- org.apache.johnzon.core.JsonProviderImpl
-
- All Implemented Interfaces:
Serializable
public class JsonProviderImpl extends jakarta.json.spi.JsonProvider implements Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
JsonProviderImpl.Cached<T>
Enables to not allocate potentially big instances or delay the initialization but ensure it happens only once.
-
Field Summary
Fields Modifier and Type Field Description private Supplier<BufferStrategy.BufferProvider<char[]>>
bufferProvider
private Supplier<jakarta.json.JsonBuilderFactory>
builderFactory
private jakarta.json.stream.JsonGeneratorFactory
generatorFactory
private int
maxBigDecimalScale
private jakarta.json.stream.JsonParserFactory
parserFactory
private jakarta.json.JsonReaderFactory
readerFactory
private jakarta.json.JsonWriterFactory
writerFactory
-
Constructor Summary
Constructors Constructor Description JsonProviderImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkBigDecimalScale(BigDecimal value)
jakarta.json.JsonArrayBuilder
createArrayBuilder()
jakarta.json.JsonArrayBuilder
createArrayBuilder(jakarta.json.JsonArray initialData)
jakarta.json.JsonArrayBuilder
createArrayBuilder(Collection<?> initialData)
jakarta.json.JsonBuilderFactory
createBuilderFactory(Map<String,?> config)
jakarta.json.JsonPatch
createDiff(jakarta.json.JsonStructure source, jakarta.json.JsonStructure target)
jakarta.json.stream.JsonGenerator
createGenerator(OutputStream out)
jakarta.json.stream.JsonGenerator
createGenerator(Writer writer)
jakarta.json.stream.JsonGeneratorFactory
createGeneratorFactory(Map<String,?> config)
jakarta.json.JsonMergePatch
createMergeDiff(jakarta.json.JsonValue source, jakarta.json.JsonValue target)
jakarta.json.JsonMergePatch
createMergePatch(jakarta.json.JsonValue patch)
jakarta.json.JsonObjectBuilder
createObjectBuilder()
jakarta.json.JsonObjectBuilder
createObjectBuilder(jakarta.json.JsonObject jsonObject)
jakarta.json.JsonObjectBuilder
createObjectBuilder(Map<String,?> initialValues)
jakarta.json.stream.JsonParser
createParser(InputStream in)
jakarta.json.stream.JsonParser
createParser(Reader reader)
jakarta.json.stream.JsonParserFactory
createParserFactory(Map<String,?> config)
jakarta.json.JsonPatch
createPatch(jakarta.json.JsonArray array)
jakarta.json.JsonPatchBuilder
createPatchBuilder()
jakarta.json.JsonPatchBuilder
createPatchBuilder(jakarta.json.JsonArray initialData)
jakarta.json.JsonPointer
createPointer(String path)
jakarta.json.JsonReader
createReader(InputStream in)
jakarta.json.JsonReader
createReader(Reader reader)
jakarta.json.JsonReaderFactory
createReaderFactory(Map<String,?> config)
jakarta.json.JsonNumber
createValue(double value)
jakarta.json.JsonNumber
createValue(int value)
jakarta.json.JsonNumber
createValue(long value)
jakarta.json.JsonNumber
createValue(Number number)
jakarta.json.JsonString
createValue(String value)
jakarta.json.JsonNumber
createValue(BigDecimal value)
jakarta.json.JsonNumber
createValue(BigInteger value)
jakarta.json.JsonWriter
createWriter(OutputStream out)
jakarta.json.JsonWriter
createWriter(Writer writer)
jakarta.json.JsonWriterFactory
createWriterFactory(Map<String,?> config)
int
getMaxBigDecimalScale()
void
setMaxBigDecimalScale(int maxBigDecimalScale)
-
-
-
Field Detail
-
bufferProvider
private final Supplier<BufferStrategy.BufferProvider<char[]>> bufferProvider
-
readerFactory
private final jakarta.json.JsonReaderFactory readerFactory
-
parserFactory
private final jakarta.json.stream.JsonParserFactory parserFactory
-
generatorFactory
private final jakarta.json.stream.JsonGeneratorFactory generatorFactory
-
writerFactory
private final jakarta.json.JsonWriterFactory writerFactory
-
builderFactory
private final Supplier<jakarta.json.JsonBuilderFactory> builderFactory
-
maxBigDecimalScale
private int maxBigDecimalScale
-
-
Method Detail
-
createParser
public jakarta.json.stream.JsonParser createParser(InputStream in)
- Specified by:
createParser
in classjakarta.json.spi.JsonProvider
-
createParser
public jakarta.json.stream.JsonParser createParser(Reader reader)
- Specified by:
createParser
in classjakarta.json.spi.JsonProvider
-
createReader
public jakarta.json.JsonReader createReader(InputStream in)
- Specified by:
createReader
in classjakarta.json.spi.JsonProvider
-
createReader
public jakarta.json.JsonReader createReader(Reader reader)
- Specified by:
createReader
in classjakarta.json.spi.JsonProvider
-
createParserFactory
public jakarta.json.stream.JsonParserFactory createParserFactory(Map<String,?> config)
- Specified by:
createParserFactory
in classjakarta.json.spi.JsonProvider
-
createReaderFactory
public jakarta.json.JsonReaderFactory createReaderFactory(Map<String,?> config)
- Specified by:
createReaderFactory
in classjakarta.json.spi.JsonProvider
-
createGenerator
public jakarta.json.stream.JsonGenerator createGenerator(Writer writer)
- Specified by:
createGenerator
in classjakarta.json.spi.JsonProvider
-
createGenerator
public jakarta.json.stream.JsonGenerator createGenerator(OutputStream out)
- Specified by:
createGenerator
in classjakarta.json.spi.JsonProvider
-
createGeneratorFactory
public jakarta.json.stream.JsonGeneratorFactory createGeneratorFactory(Map<String,?> config)
- Specified by:
createGeneratorFactory
in classjakarta.json.spi.JsonProvider
-
createWriter
public jakarta.json.JsonWriter createWriter(Writer writer)
- Specified by:
createWriter
in classjakarta.json.spi.JsonProvider
-
createWriter
public jakarta.json.JsonWriter createWriter(OutputStream out)
- Specified by:
createWriter
in classjakarta.json.spi.JsonProvider
-
createWriterFactory
public jakarta.json.JsonWriterFactory createWriterFactory(Map<String,?> config)
- Specified by:
createWriterFactory
in classjakarta.json.spi.JsonProvider
-
createObjectBuilder
public jakarta.json.JsonObjectBuilder createObjectBuilder()
- Specified by:
createObjectBuilder
in classjakarta.json.spi.JsonProvider
-
createObjectBuilder
public jakarta.json.JsonObjectBuilder createObjectBuilder(jakarta.json.JsonObject jsonObject)
- Overrides:
createObjectBuilder
in classjakarta.json.spi.JsonProvider
-
createObjectBuilder
public jakarta.json.JsonObjectBuilder createObjectBuilder(Map<String,?> initialValues)
- Overrides:
createObjectBuilder
in classjakarta.json.spi.JsonProvider
-
createArrayBuilder
public jakarta.json.JsonArrayBuilder createArrayBuilder()
- Specified by:
createArrayBuilder
in classjakarta.json.spi.JsonProvider
-
createArrayBuilder
public jakarta.json.JsonArrayBuilder createArrayBuilder(jakarta.json.JsonArray initialData)
- Overrides:
createArrayBuilder
in classjakarta.json.spi.JsonProvider
-
createArrayBuilder
public jakarta.json.JsonArrayBuilder createArrayBuilder(Collection<?> initialData)
- Overrides:
createArrayBuilder
in classjakarta.json.spi.JsonProvider
-
createValue
public jakarta.json.JsonString createValue(String value)
- Overrides:
createValue
in classjakarta.json.spi.JsonProvider
-
createValue
public jakarta.json.JsonNumber createValue(int value)
- Overrides:
createValue
in classjakarta.json.spi.JsonProvider
-
createValue
public jakarta.json.JsonNumber createValue(long value)
- Overrides:
createValue
in classjakarta.json.spi.JsonProvider
-
createValue
public jakarta.json.JsonNumber createValue(double value)
- Overrides:
createValue
in classjakarta.json.spi.JsonProvider
-
createValue
public jakarta.json.JsonNumber createValue(BigDecimal value)
- Overrides:
createValue
in classjakarta.json.spi.JsonProvider
-
createValue
public jakarta.json.JsonNumber createValue(Number number)
- Overrides:
createValue
in classjakarta.json.spi.JsonProvider
-
createValue
public jakarta.json.JsonNumber createValue(BigInteger value)
- Overrides:
createValue
in classjakarta.json.spi.JsonProvider
-
createBuilderFactory
public jakarta.json.JsonBuilderFactory createBuilderFactory(Map<String,?> config)
- Specified by:
createBuilderFactory
in classjakarta.json.spi.JsonProvider
-
createPatchBuilder
public jakarta.json.JsonPatchBuilder createPatchBuilder()
- Overrides:
createPatchBuilder
in classjakarta.json.spi.JsonProvider
-
createPatchBuilder
public jakarta.json.JsonPatchBuilder createPatchBuilder(jakarta.json.JsonArray initialData)
- Overrides:
createPatchBuilder
in classjakarta.json.spi.JsonProvider
-
createPointer
public jakarta.json.JsonPointer createPointer(String path)
- Overrides:
createPointer
in classjakarta.json.spi.JsonProvider
-
createPatch
public jakarta.json.JsonPatch createPatch(jakarta.json.JsonArray array)
- Overrides:
createPatch
in classjakarta.json.spi.JsonProvider
-
createDiff
public jakarta.json.JsonPatch createDiff(jakarta.json.JsonStructure source, jakarta.json.JsonStructure target)
- Overrides:
createDiff
in classjakarta.json.spi.JsonProvider
-
createMergePatch
public jakarta.json.JsonMergePatch createMergePatch(jakarta.json.JsonValue patch)
- Overrides:
createMergePatch
in classjakarta.json.spi.JsonProvider
-
createMergeDiff
public jakarta.json.JsonMergePatch createMergeDiff(jakarta.json.JsonValue source, jakarta.json.JsonValue target)
- Overrides:
createMergeDiff
in classjakarta.json.spi.JsonProvider
-
getMaxBigDecimalScale
public int getMaxBigDecimalScale()
-
setMaxBigDecimalScale
public void setMaxBigDecimalScale(int maxBigDecimalScale)
-
checkBigDecimalScale
public void checkBigDecimalScale(BigDecimal value)
-
-