com.jn.agileway.codec.serialization.json.JacksonCodec Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of agileway-codec Show documentation
Show all versions of agileway-codec Show documentation
Provide an unified codec API for hession, kryo, protostuff, fst, fes, xson, cbor, jackson, json, etc....
package com.jn.agileway.codec.serialization.json;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.jn.agileway.codec.serialization.jackson.BasedJacksonCodec;
public class JacksonCodec extends BasedJacksonCodec {
public JacksonCodec() {
super(new ObjectMapper(new JsonFactory()));
}
public JacksonCodec(ClassLoader classLoader) {
super(createObjectMapper(classLoader, new ObjectMapper(new JsonFactory())));
}
public JacksonCodec(ClassLoader classLoader, JacksonCodec codec) {
super(createObjectMapper(classLoader, codec.objectMapper.copy()));
}
}