JungleConfig ships with ten built-inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/himansaBro/JungleConfig/llms.txt
Use this file to discover all available pages before exploring further.
TypeConverterAdapter implementations that cover the most common Java value types. All ten adapters are registered automatically in every instance created through the convenience constructors — new JungleConfig(File), JungleConfig.EncryptedConfig(File, String), JungleConfig.InMemoryConfig(), and JungleConfig.FlatJsonConfig(). You do not need to configure them explicitly; just call Set with a supported value and JungleConfig routes it to the correct adapter.
Each adapter converts its target type to a plain string via ConvertToSave before the string is URL-encoded and written to the backing store. On read, the stored string is URL-decoded and passed to CastToUse, which reconstructs the original value.
NativeFlatJsonConverter is a ConverterInterface implementation (not a TypeConverterAdapter) and is therefore not listed here. It handles the file-level encoding format and operates at a different layer of the stack.Adapter Reference Table
| Adapter Class | getType() | Java Type | Storage Format |
|---|---|---|---|
NativeBooleanAdapter | "Boolean" | java.lang.Boolean | "true" or "false" |
NativeIntagerAdapter | "Integer" | java.lang.Integer | Decimal string, e.g. "42" |
NativeStringAdapter | "String" | java.lang.String | Raw string (URL-encoded on disk) |
NativeLongAdapter | "Long" | java.lang.Long | Decimal string, e.g. "9223372036854775807" |
NativeDoubleAdapter | "Double" | java.lang.Double | toString() output, e.g. "3.14159" or "1.0E-4" for extreme values |
NativeFloatAdapter | "Float" | java.lang.Float | toString() output, e.g. "1.23" |
NativeUUIDAdapter | "UUID" | java.util.UUID | Standard UUID string, e.g. "550e8400-e29b-41d4-a716-446655440000" |
NativeLocalDateAdapter | "LocalDate" | java.time.LocalDate | ISO-8601 date, e.g. "2024-02-29" |
NativeLocalDateTimeAdapter | "LocalDateTime" | java.time.LocalDateTime | ISO-8601 datetime, e.g. "2024-02-29T12:34:56" |
NativeLocalTimeAdapter | "LocalTime" | java.time.LocalTime | ISO-8601 time, e.g. "12:34:56" |
com.codehack.JungleConfig.Core.Adapters.
Adapter Details
NativeBooleanAdapter
Handlesjava.lang.Boolean. Serialization compares the object’s toString() against "true" and stores either "true" or "false". Deserialization performs a strict equality check against "true" — any other string (including "True" or "1") deserializes as false.
NativeIntagerAdapter
Handlesjava.lang.Integer via Integer.toString() / Integer.valueOf(). The class name contains a typo from the original source — see the note below.
NativeStringAdapter
Handlesjava.lang.String. ConvertToSave returns the string as-is; the ConverterInterface layer applies URL-encoding before writing to disk, so strings containing =, &, \n, and similar characters are stored safely.
NativeLongAdapter
Handlesjava.lang.Long via toString() / Long.valueOf(). Use this adapter (or call Set with an explicit "Long" type hint) when storing values that exceed Integer.MAX_VALUE.
NativeDoubleAdapter
Handlesjava.lang.Double via toString() / Double.valueOf(). The storage format is the output of Double.toString(), which uses standard decimal notation for most values but switches to scientific notation for very large or very small values (e.g. "1.0E-4").
NativeFloatAdapter
Handlesjava.lang.Float via toString() / Float.valueOf().
NativeUUIDAdapter
Handlesjava.util.UUID via toString() / UUID.fromString(). Values are stored in the standard 8-4-4-4-12 hyphenated hex format.
NativeLocalDateAdapter
Handlesjava.time.LocalDate via toString() on write and LocalDate.parse(data) on read. Values are stored in ISO-8601 date format (yyyy-MM-dd).
NativeLocalDateTimeAdapter
Handlesjava.time.LocalDateTime via toString() on write and LocalDateTime.parse(data) on read. Values are stored as ISO-8601 local date-time strings (e.g. "2024-02-29T12:34:56").
NativeLocalTimeAdapter
Handlesjava.time.LocalTime via toString() on write and LocalTime.parse(data) on read. Values are stored as ISO-8601 time strings (e.g. "12:34:56").
Usage Example
The following snippet demonstrates storing and reading every major built-in type using an in-memory config instance:NativeIntagerAdapter contains a typo in its class name — “Intager” instead of “Integer” — inherited from the original source code. The class name is NativeIntagerAdapter and this is the actual identifier you will see in stack traces, imports, and reflection output. However, getType() correctly returns Integer.class.getSimpleName(), which equals "Integer", so there is no functional impact: config.Set("count", 42) and config.get("count", Integer.class) both work exactly as expected.