public static class JsonConvertOptions.Builder extends Object
Constructor and Description |
---|
Builder()
Default constructor using default hard limits
|
Builder(int pHardMaxDepth,
int pHardMaxCollectionSize,
int pHardMaxObjects)
Constructor with hard limits.
|
Modifier and Type | Method and Description |
---|---|
JsonConvertOptions |
build()
Build the convert options and reset this builder
|
JsonConvertOptions.Builder |
faultHandler(ValueFaultHandler pFaultHandler)
Set the handler which determines what should be done when
extracting of an value fails.
|
JsonConvertOptions.Builder |
maxCollectionSize(int pMaxCollectionSize)
Set the maximal size of collections when serializing collections.
|
JsonConvertOptions.Builder |
maxDepth(int pMaxDepth)
Set the maximum depth for how deep serialization should go.
|
JsonConvertOptions.Builder |
maxObjects(int pMaxObjects)
Set the maximum number of objects to serialize.
|
JsonConvertOptions.Builder |
useAttributeFilter(boolean pUseFilter)
Whether an attribute filter should be used to ignore missing attributes when a path is
applied
|
public Builder()
public Builder(int pHardMaxDepth, int pHardMaxCollectionSize, int pHardMaxObjects)
pHardMaxDepth
- hard limit for maxDepthpHardMaxCollectionSize
- hard limit for maxCollectionSizepHardMaxObjects
- hard limit for maxObjects.public JsonConvertOptions.Builder maxDepth(int pMaxDepth)
pMaxDepth
- maximal depth when traversing an object tree during serialization.public JsonConvertOptions.Builder maxCollectionSize(int pMaxCollectionSize)
pMaxCollectionSize
- maximum size of objects returned in a serialized collectionpublic JsonConvertOptions.Builder maxObjects(int pMaxObjects)
pMaxObjects
- maximum number of objectspublic JsonConvertOptions.Builder faultHandler(ValueFaultHandler pFaultHandler)
pFaultHandler
- handler to use which can be either ValueFaultHandler.THROWING_VALUE_FAULT_HANDLER
or ValueFaultHandler.THROWING_VALUE_FAULT_HANDLER
.
If argument is null, it is ignoredpublic JsonConvertOptions.Builder useAttributeFilter(boolean pUseFilter)
pUseFilter
- if a filter should be used or notpublic JsonConvertOptions build()
Copyright © 2016. All rights reserved.