
pl.zientarski.serialization.ObjectSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of JSONschema4-mapper Show documentation
Show all versions of JSONschema4-mapper Show documentation
The goal of this project is to provide comprehensive, feature-complete and well-tested mapper from Java classes to JSON schema format.
The newest version!
package pl.zientarski.serialization;
import pl.zientarski.MapperContext;
import pl.zientarski.PropertyDescription;
public class ObjectSerializer extends ReferenceSerializer {
public ObjectSerializer(final PropertyDescription propertyDescription, final MapperContext mapperContext) {
super(propertyDescription, mapperContext);
}
@Override
public boolean isPropertyRequired() {
return false;
}
@Override
protected String getReference() {
final Class> clazz = (Class>) propertyDescription.getType();
mapperContext.addDependency(propertyDescription.getType());
return mapperContext.getTypeReference(clazz);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy