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

name.remal.json.internal.configurers.DefaultJsonFactoryConfigurer Maven / Gradle / Ivy

The newest version!
package name.remal.json.internal.configurers;

import com.fasterxml.jackson.core.JsonFactory;
import name.remal.json.api.JsonFactoryConfigurer;

import javax.annotation.Nonnull;

import static com.fasterxml.jackson.core.JsonFactory.Feature.INTERN_FIELD_NAMES;
import static com.fasterxml.jackson.core.JsonParser.Feature.*;

public class DefaultJsonFactoryConfigurer implements JsonFactoryConfigurer {

    @Override
    public void configure(@Nonnull JsonFactory jsonFactory) {
        jsonFactory.configure(INTERN_FIELD_NAMES, false);

        jsonFactory.configure(ALLOW_COMMENTS, true);
        jsonFactory.configure(ALLOW_UNQUOTED_FIELD_NAMES, true);
        jsonFactory.configure(ALLOW_SINGLE_QUOTES, true);
        jsonFactory.configure(ALLOW_TRAILING_COMMA, true);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy