Package adaptlil.serialization_helpers
Class INDArrayToDoubleArraySerializer
java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<org.nd4j.linalg.api.ndarray.INDArray>
adaptlil.serialization_helpers.INDArrayToDoubleArraySerializer
- All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
public class INDArrayToDoubleArraySerializer
extends com.fasterxml.jackson.databind.JsonSerializer<org.nd4j.linalg.api.ndarray.INDArray>
Serializes an INDArray to a byte array
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer
com.fasterxml.jackson.databind.JsonSerializer.None
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
serialize
(org.nd4j.linalg.api.ndarray.INDArray indArray, com.fasterxml.jackson.core.JsonGenerator jsonGenerator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider) Converts an INDArray to a byte array for serialization by JacksonMethods inherited from class com.fasterxml.jackson.databind.JsonSerializer
acceptJsonFormatVisitor, getDelegatee, handledType, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId, withFilterId
-
Constructor Details
-
INDArrayToDoubleArraySerializer
public INDArrayToDoubleArraySerializer()
-
-
Method Details
-
serialize
public void serialize(org.nd4j.linalg.api.ndarray.INDArray indArray, com.fasterxml.jackson.core.JsonGenerator jsonGenerator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider) throws IOException Converts an INDArray to a byte array for serialization by Jackson- Specified by:
serialize
in classcom.fasterxml.jackson.databind.JsonSerializer<org.nd4j.linalg.api.ndarray.INDArray>
- Parameters:
indArray
- Value to serialize; can not be null.jsonGenerator
- Generator used to output resulting Json contentserializerProvider
- Provider that can be used to get serializers for serializing Objects value contains, if any.- Throws:
IOException
-