All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nd4j.linalg.primitives.serde.JsonSerializerAtomicBoolean Maven / Gradle / Ivy

There is a newer version: 1.0.0-M2.1
Show newest version
package org.nd4j.linalg.primitives.serde;

import org.nd4j.linalg.primitives.AtomicBoolean;
import org.nd4j.linalg.primitives.AtomicDouble;
import org.nd4j.shade.jackson.core.JsonGenerator;
import org.nd4j.shade.jackson.core.JsonProcessingException;
import org.nd4j.shade.jackson.databind.JsonSerializer;
import org.nd4j.shade.jackson.databind.SerializerProvider;

import java.io.IOException;

public class JsonSerializerAtomicBoolean extends JsonSerializer {
    @Override
    public void serialize(AtomicBoolean atomicDouble, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException, JsonProcessingException {
        jsonGenerator.writeBoolean(atomicDouble.get());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy