-
Notifications
You must be signed in to change notification settings - Fork 0
Integrations
frosxt edited this page Jan 18, 2026
·
1 revision
JsonConfig is designed to be standalone, but many projects already use Gson or Jackson. We provide adapter modules to convert strictly typed JsonNode objects to/from Gson JsonElement or Jackson JsonNode.
Module: jsonconfig-gson
import com.github.frosxt.jsonconfig.gson.GsonAdapter;
import com.google.gson.JsonElement;
import com.github.frosxt.jsonconfig.tree.JsonNode;
// Convert from JsonConfig -> Gson
JsonNode configNode = config.getNode("some.val");
JsonElement gsonElement = GsonAdapter.toGson(configNode);
// Convert from Gson -> JsonConfig
JsonElement customGsonObj = ...;
JsonNode jConfigNode = GsonAdapter.toJConfig(customGsonObj);Module: jsonconfig-jackson
import com.github.frosxt.jsonconfig.jackson.JacksonAdapter;
import com.fasterxml.jackson.databind.JsonNode;
// Convert from JsonConfig -> Jackson
com.github.frosxt.jsonconfig.tree.JsonNode myNode = config.getNode("data");
JsonNode jacksonNode = JacksonAdapter.toJackson(myNode);
// Convert from Jackson -> JsonConfig
JsonNode jacksonInput = ...;
com.github.frosxt.jsonconfig.tree.JsonNode result = JacksonAdapter.toJConfig(jacksonInput);These are useful if you want to use JsonConfig's Path API or Merge Logic to manage a file, but then pass the resulting object tree to Gson/Jackson for advanced POJO mapping or serialization.