Package io.micronaut.serde.json.stream
Class JsonStreamMapper
java.lang.Object
io.micronaut.serde.json.stream.JsonStreamMapper
- All Implemented Interfaces:
io.micronaut.json.JsonMapper,ObjectMapper
Implementation of the
JsonMapper interface for JSON-P.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.serde.ObjectMapper
ObjectMapper.CloseableObjectMapper -
Constructor Summary
ConstructorsConstructorDescriptionJsonStreamMapper(@NonNull SerdeRegistry registry) Deprecated.JsonStreamMapper(@NonNull SerdeRegistry registry, @NonNull SerdeConfiguration serdeConfiguration) JsonStreamMapper(@NonNull SerdeRegistry registry, @Nullable Class<?> view) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptioncloneWithConfiguration(@Nullable SerdeConfiguration configuration, @Nullable SerializationConfiguration serializationConfiguration, @Nullable DeserializationConfiguration deserializationConfiguration) Optional feature.io.micronaut.json.JsonMappercloneWithViewClass(Class<?> viewClass) org.reactivestreams.Processor<byte[],io.micronaut.json.tree.JsonNode> createReactiveParser(Consumer<org.reactivestreams.Processor<byte[], io.micronaut.json.tree.JsonNode>> onSubscribe, boolean streamArray) io.micronaut.json.JsonStreamConfig<T> TreadValue(byte[] byteArray, io.micronaut.core.type.Argument<T> type) <T> TreadValue(InputStream inputStream, io.micronaut.core.type.Argument<T> type) <T> TreadValueFromTree(io.micronaut.json.tree.JsonNode tree, io.micronaut.core.type.Argument<T> type) <T> voidwriteValue(OutputStream outputStream, io.micronaut.core.type.Argument<T> type, T object) voidwriteValue(OutputStream outputStream, Object object) <T> byte[]writeValueAsBytes(io.micronaut.core.type.Argument<T> type, T object) byte[]writeValueAsBytes(Object object) <T> io.micronaut.json.tree.JsonNodewriteValueToTree(io.micronaut.core.type.Argument<T> type, T value) io.micronaut.json.tree.JsonNodewriteValueToTree(Object value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.json.JsonMapper
createSpecific, detectFeatures, readValue, readValue, readValue, readValue, readValue, readValueFromTree, updateValueFromTree, writeValueAsString, writeValueAsStringMethods inherited from interface io.micronaut.serde.ObjectMapper
cloneWithFeatures, writeValueAsString
-
Constructor Details
-
JsonStreamMapper
Deprecated. -
JsonStreamMapper
@Deprecated public JsonStreamMapper(@NonNull @NonNull SerdeRegistry registry, @Nullable @Nullable Class<?> view) Deprecated. -
JsonStreamMapper
@Inject public JsonStreamMapper(@NonNull @NonNull SerdeRegistry registry, @NonNull @NonNull SerdeConfiguration serdeConfiguration)
-
-
Method Details
-
cloneWithConfiguration
public ObjectMapper cloneWithConfiguration(@Nullable @Nullable SerdeConfiguration configuration, @Nullable @Nullable SerializationConfiguration serializationConfiguration, @Nullable @Nullable DeserializationConfiguration deserializationConfiguration) Description copied from interface:ObjectMapperOptional feature. Create a newObjectMapperwith the given configuration values. Anullparameter indicates the old configuration should be used.- Specified by:
cloneWithConfigurationin interfaceObjectMapper- Parameters:
configuration- TheSerdeConfigurationserializationConfiguration- TheSerializationConfigurationdeserializationConfiguration- TheDeserializationConfiguration- Returns:
- A new
JsonMapperwith the updated config
-
cloneWithViewClass
- Specified by:
cloneWithViewClassin interfaceio.micronaut.json.JsonMapper
-
readValueFromTree
public <T> T readValueFromTree(io.micronaut.json.tree.JsonNode tree, io.micronaut.core.type.Argument<T> type) throws IOException - Specified by:
readValueFromTreein interfaceio.micronaut.json.JsonMapper- Throws:
IOException
-
readValue
public <T> T readValue(InputStream inputStream, io.micronaut.core.type.Argument<T> type) throws IOException - Specified by:
readValuein interfaceio.micronaut.json.JsonMapper- Throws:
IOException
-
readValue
public <T> T readValue(byte[] byteArray, io.micronaut.core.type.Argument<T> type) throws IOException - Specified by:
readValuein interfaceio.micronaut.json.JsonMapper- Throws:
IOException
-
createReactiveParser
public org.reactivestreams.Processor<byte[],io.micronaut.json.tree.JsonNode> createReactiveParser(Consumer<org.reactivestreams.Processor<byte[], io.micronaut.json.tree.JsonNode>> onSubscribe, boolean streamArray) - Specified by:
createReactiveParserin interfaceio.micronaut.json.JsonMapper
-
writeValueToTree
- Specified by:
writeValueToTreein interfaceio.micronaut.json.JsonMapper- Throws:
IOException
-
writeValueToTree
public <T> io.micronaut.json.tree.JsonNode writeValueToTree(io.micronaut.core.type.Argument<T> type, T value) throws IOException - Specified by:
writeValueToTreein interfaceio.micronaut.json.JsonMapper- Throws:
IOException
-
writeValue
- Specified by:
writeValuein interfaceio.micronaut.json.JsonMapper- Throws:
IOException
-
writeValue
public <T> void writeValue(OutputStream outputStream, io.micronaut.core.type.Argument<T> type, T object) throws IOException - Specified by:
writeValuein interfaceio.micronaut.json.JsonMapper- Throws:
IOException
-
writeValueAsBytes
- Specified by:
writeValueAsBytesin interfaceio.micronaut.json.JsonMapper- Throws:
IOException
-
writeValueAsBytes
public <T> byte[] writeValueAsBytes(io.micronaut.core.type.Argument<T> type, T object) throws IOException - Specified by:
writeValueAsBytesin interfaceio.micronaut.json.JsonMapper- Throws:
IOException
-
getStreamConfig
public io.micronaut.json.JsonStreamConfig getStreamConfig()- Specified by:
getStreamConfigin interfaceio.micronaut.json.JsonMapper
-