diff --git a/bosk-jackson/src/main/java/works/bosk/jackson/JacksonPlugin.java b/bosk-jackson/src/main/java/works/bosk/jackson/JacksonPlugin.java index d9846da9..113c9567 100644 --- a/bosk-jackson/src/main/java/works/bosk/jackson/JacksonPlugin.java +++ b/bosk-jackson/src/main/java/works/bosk/jackson/JacksonPlugin.java @@ -1,6 +1,5 @@ package works.bosk.jackson; -import com.fasterxml.jackson.core.JacksonException; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonParser; @@ -67,6 +66,7 @@ import static works.bosk.ListingEntry.LISTING_ENTRY; import static works.bosk.ReferenceUtils.rawClass; import static works.bosk.ReferenceUtils.theOnlyConstructorFor; +import static works.bosk.jackson.JacksonPluginConfiguration.defaultConfiguration; /** * Provides JSON serialization/deserialization using Jackson. @@ -74,6 +74,15 @@ */ public final class JacksonPlugin extends SerializationPlugin { private final JacksonCompiler compiler = new JacksonCompiler(this); + private final JacksonPluginConfiguration config; + + public JacksonPlugin() { + this(defaultConfiguration()); + } + + public JacksonPlugin(JacksonPluginConfiguration config) { + this.config = config; + } public BoskJacksonModule moduleFor(BoskInfo boskInfo) { return new BoskJacksonModule() { diff --git a/bosk-jackson/src/main/java/works/bosk/jackson/JacksonPluginConfiguration.java b/bosk-jackson/src/main/java/works/bosk/jackson/JacksonPluginConfiguration.java new file mode 100644 index 00000000..3626719e --- /dev/null +++ b/bosk-jackson/src/main/java/works/bosk/jackson/JacksonPluginConfiguration.java @@ -0,0 +1,9 @@ +package works.bosk.jackson; + +public record JacksonPluginConfiguration( + boolean useLinkedEntries +) { + public static JacksonPluginConfiguration defaultConfiguration() { + return new JacksonPluginConfiguration(false); + } +}