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

pl.zientarski.serialization.ObjectSerializer Maven / Gradle / Ivy

Go to download

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