io.setl.json.spring.ConfigureCanonicalJson Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of canonical-json Show documentation
Show all versions of canonical-json Show documentation
An implementation of the Canonical JSON format with support for javax.json and Jackson
The newest version!
package io.setl.json.spring;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import io.setl.json.jackson.JsonModule;
/**
* Optional registration of a Jackson JsonModule.
*
* @author Simon Greatrix on 12/02/2020.
*/
@Configuration
public class ConfigureCanonicalJson {
/** New instance. */
public ConfigureCanonicalJson() {
// do nothing
}
/**
* Register the Canonical JSON module.
*
* @return the module
*/
@Bean
@ConditionalOnExpression("${setl.json.enabled:true}")
public com.fasterxml.jackson.databind.Module canonicalJsonModule() {
return new JsonModule();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy