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

pl.zientarski.serialization.PropertySerializer 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 org.json.JSONObject;
import pl.zientarski.MapperContext;
import pl.zientarski.PropertyDescription;

public abstract class PropertySerializer {

    protected final PropertyDescription propertyDescription;
    protected final MapperContext mapperContext;

    public PropertySerializer(final PropertyDescription propertyDescription, final MapperContext mapperContext) {
        this.propertyDescription = propertyDescription;
        this.mapperContext = mapperContext;
    }

    public String getPropertyName() {
        return propertyDescription.getName();
    }

    public abstract JSONObject toJsonObject();

    public boolean isPropertyRequired() {
        return false;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy