com.talanlabs.componentjackson.ComponentSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of component-jackson Show documentation
Show all versions of component-jackson Show documentation
Module Jackson for Component Bean
The newest version!
package com.talanlabs.componentjackson;
import com.fasterxml.jackson.core.JsonGenerationException;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import com.talanlabs.component.IComponent;
import java.io.IOException;
public class ComponentSerializer extends StdSerializer {
public ComponentSerializer() {
super(IComponent.class);
}
@Override
public void serialize(IComponent value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonGenerationException {
jgen.writeObject(value.straightGetProperties());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy