fr.insee.vtl.jackson.TrevasModule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vtl-jackson Show documentation
Show all versions of vtl-jackson Show documentation
Jackson module for the VTL model
The newest version!
package fr.insee.vtl.jackson;
import com.fasterxml.jackson.databind.module.SimpleModule;
import fr.insee.vtl.model.Dataset;
import fr.insee.vtl.model.Structured;
import javax.script.Bindings;
/**
* TrevasModule
is a Jackson module that allows the registration of Trevas serializers and deserializers.
*/
public class TrevasModule extends SimpleModule {
/**
* Base constructor: registers Trevas serializers and deserializers.
*/
public TrevasModule() {
addDeserializer(Bindings.class, new BindingsDeserializer());
addDeserializer(Dataset.class, new DatasetDeserializer());
addDeserializer(Structured.Component.class, new ComponentDeserializer());
addSerializer(Structured.Component.class, new ComponentSerializer());
addSerializer(Dataset.class, new DatasetSerializer());
}
}