| Package | Description |
|---|---|
| com.dslplatform.json | |
| com.dslplatform.json.runtime |
| Modifier and Type | Method and Description |
|---|---|
DslJson.Settings<TContext> |
DslJson.Settings.allowArrayFormat(boolean allowArrayFormat)
Some encoders/decoders support writing objects in array format.
|
DslJson.Settings<TContext> |
DslJson.Settings.creatorMarker(Class<? extends Annotation> marker,
boolean expandVisibility)
When there are multiple constructors, pick the one marked with annotation.
|
DslJson.Settings<TContext> |
DslJson.Settings.doublePrecision(JsonReader.DoublePrecision precision)
By default doubles are not deserialized into an exact value in some rare edge cases.
|
DslJson.Settings<TContext> |
DslJson.Settings.errorInfo(JsonReader.ErrorInfo errorInfo)
By default doubles are not deserialized into an exact value in some rare edge cases.
|
DslJson.Settings<TContext> |
DslJson.Settings.fallbackTo(DslJson.Fallback<TContext> fallback)
Deprecated.
|
DslJson.Settings<TContext> |
DslJson.Settings.includeServiceLoader()
Load converters using thread local ClassLoader.
|
DslJson.Settings<TContext> |
DslJson.Settings.includeServiceLoader(ClassLoader loader)
Load converters using provided `ClassLoader` instance
Will scan through `META-INF/services/com.dslplatform.json.Configuration` file and register implementation during startup.
|
DslJson.Settings<TContext> |
DslJson.Settings.limitDigitsBuffer(int size)
Specify maximum allowed size for digits buffer.
|
DslJson.Settings<TContext> |
DslJson.Settings.limitStringBuffer(int size)
Specify maximum allowed size for string buffer.
|
DslJson.Settings<TContext> |
DslJson.Settings.resolveBinder(DslJson.ConverterFactory<? extends JsonReader.BindObject> binder)
DslJson will iterate over converter factories when requested type is unknown.
|
DslJson.Settings<TContext> |
DslJson.Settings.resolveReader(DslJson.ConverterFactory<? extends JsonReader.ReadObject> reader)
DslJson will iterate over converter factories when requested type is unknown.
|
DslJson.Settings<TContext> |
DslJson.Settings.resolveWriter(DslJson.ConverterFactory<? extends JsonWriter.WriteObject> writer)
DslJson will iterate over converter factories when requested type is unknown.
|
DslJson.Settings<TContext> |
DslJson.Settings.skipDefaultValues(boolean omitDefaults)
DslJson can exclude some properties from resulting JSON which it can reconstruct fully from schema information.
|
DslJson.Settings<TContext> |
DslJson.Settings.unknownNumbers(JsonReader.UnknownNumberParsing unknownNumbers)
When processing JSON without a schema numbers can be deserialized in various ways:
- as longs and decimals
- as longs and doubles
- as decimals only
- as doubles only
Default is as long and BigDecimal
|
DslJson.Settings<TContext> |
DslJson.Settings.useKeyCache(StringCache keyCache)
Use specific key cache implementation.
|
DslJson.Settings<TContext> |
DslJson.Settings.useStringValuesCache(StringCache valuesCache)
Use specific string values cache implementation.
|
DslJson.Settings<TContext> |
DslJson.Settings.with(Configuration conf)
Configure DslJson with custom Configuration during startup.
|
DslJson.Settings<TContext> |
DslJson.Settings.withContext(TContext context)
Pass in context for DslJson.
|
DslJson.Settings<TContext> |
DslJson.Settings.withJavaConverters(boolean javaSpecifics)
Enable converters for Java specific types (Graphics API) not available on Android.
|
| Constructor and Description |
|---|
DslJson(DslJson.Settings<TContext> settings)
Fully configurable entry point.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> DslJson.Settings<T> |
Settings.basicSetup() |
static <T> DslJson.Settings<T> |
Settings.withAnalyzers() |
static <T> DslJson.Settings<T> |
Settings.withAnalyzers(boolean unknownReader,
boolean unknownWriter) |
static <T> DslJson.Settings<T> |
Settings.withRuntime() |
Copyright © 2023. All rights reserved.