| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | |
| private int | |
| private boolean | |
| private int | |
| private int | |
| private boolean | |
| private TagInspector | tagInspector
Secure by default - no custom classes are allowed |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | Returns: when recursive keys are allowed (the document should be trusted)getter |
| public final int | |
| public final int | |
| public final int | |
| public TagInspector | |
| public final boolean | Returns: true when duplicate keys in mapping allowed (the latter overrides the former)getter |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public void | setAllowDuplicateKeys(boolean
false to reject duplicate mapping keys allowDuplicateKeys)Allow/Reject duplicate map keys in the YAML file. |
| public void | setAllowRecursiveKeys(boolean
- false to disable recursive keys allowRecursiveKeys)Allow recursive keys for mappings. |
| public void | setCodePointLimit(int
- the max allowed size of a single YAML document in a stream codePointLimit)The max amount of code points for every input YAML document in the stream. |
| public void | setEnumCaseSensitive(boolean
- true to set enum case-sensitive, false the reverse enumCaseSensitive)Disables or enables case sensitivity during construct enum constant from string value Default is false. |
| public void | setMaxAliasesForCollections(int
set max allowed value (50 by default) maxAliasesForCollections)Restrict the amount of aliases for collections (sequences and mappings) to avoid https://en.wikipedia.org/wiki/Billion_laughs_attack |
| public void | setNestingDepthLimit(int
- depth to be accepted (50 by default) nestingDepthLimit)Set max depth of nested collections. |
| public LoaderOptions | Returns: applied optionstrue to process; false to ignoreSet the comment processing. |
| public void | |
| public void | setWrappedToRootException(boolean
- true to convert runtime exception to YAMLException wrappedToRootException)Wrap runtime exception to YAMLException during parsing or leave them as they are Default is to leave original exceptions |
| allowDuplicateKeys | back to summary |
|---|---|
| private boolean allowDuplicateKeys | |
| allowRecursiveKeys | back to summary |
|---|---|
| private boolean allowRecursiveKeys | |
| codePointLimit | back to summary |
|---|---|
| private int codePointLimit | |
| enumCaseSensitive | back to summary |
|---|---|
| private boolean enumCaseSensitive | |
| maxAliasesForCollections | back to summary |
|---|---|
| private int maxAliasesForCollections | |
| nestingDepthLimit | back to summary |
|---|---|
| private int nestingDepthLimit | |
| processComments | back to summary |
|---|---|
| private boolean processComments | |
| tagInspector | back to summary |
|---|---|
| private TagInspector tagInspector Secure by default - no custom classes are allowed | |
| wrappedToRootException | back to summary |
|---|---|
| private boolean wrappedToRootException | |
| LoaderOptions | back to summary |
|---|---|
| public LoaderOptions() | |
| getAllowRecursiveKeys | back to summary |
|---|---|
| public final boolean getAllowRecursiveKeys() getter
| |
| getCodePointLimit | back to summary |
|---|---|
| public final int getCodePointLimit() getter
| |
| getMaxAliasesForCollections | back to summary |
|---|---|
| public final int getMaxAliasesForCollections() getter
| |
| getNestingDepthLimit | back to summary |
|---|---|
| public final int getNestingDepthLimit() getter
| |
| getTagInspector | back to summary |
|---|---|
| public TagInspector getTagInspector() | |
| isAllowDuplicateKeys | back to summary |
|---|---|
| public final boolean isAllowDuplicateKeys() getter
| |
| isEnumCaseSensitive | back to summary |
|---|---|
| public final boolean isEnumCaseSensitive() getter
| |
| isProcessComments | back to summary |
|---|---|
| public final boolean isProcessComments() getter
| |
| isWrappedToRootException | back to summary |
|---|---|
| public final boolean isWrappedToRootException() getter
| |
| setAllowDuplicateKeys | back to summary |
|---|---|
| public void setAllowDuplicateKeys(boolean allowDuplicateKeys) Allow/Reject duplicate map keys in the YAML file. Default is to allow. YAML 1.1 is slightly vague around duplicate entries in the YAML file. The best reference is 3.2.1.3. Nodes Comparison where it hints that a duplicate map key is an error. For future reference, YAML spec 1.2 is clear. The keys MUST be unique. 1.3. Relation to JSON
| |
| setAllowRecursiveKeys | back to summary |
|---|---|
| public void setAllowRecursiveKeys(boolean allowRecursiveKeys) Allow recursive keys for mappings. By default, it is not allowed. This setting only prevents the case when the key is the value. If the key is only a part of the value (the value is a sequence or a mapping) then this case is not recognized and always allowed.
| |
| setCodePointLimit | back to summary |
|---|---|
| public void setCodePointLimit(int codePointLimit) The max amount of code points for every input YAML document in the stream. Please be aware that byte limit depends on the encoding.
| |
| setEnumCaseSensitive | back to summary |
|---|---|
| public void setEnumCaseSensitive(boolean enumCaseSensitive) Disables or enables case sensitivity during construct enum constant from string value Default is false.
| |
| setMaxAliasesForCollections | back to summary |
|---|---|
| public void setMaxAliasesForCollections(int maxAliasesForCollections) Restrict the amount of aliases for collections (sequences and mappings) to avoid https://en.wikipedia.org/wiki/Billion_laughs_attack
| |
| setNestingDepthLimit | back to summary |
|---|---|
| public void setNestingDepthLimit(int nestingDepthLimit) Set max depth of nested collections. When the limit is exceeded an exception is thrown. Aliases/Anchors are not counted. This is to prevent a DoS attack
| |
| setProcessComments | back to summary |
|---|---|
| public LoaderOptions setProcessComments(boolean processComments) Set the comment processing. By default, comments are ignored.
| |
| setTagInspector | back to summary |
|---|---|
| public void setTagInspector(TagInspector tagInspector) | |
| setWrappedToRootException | back to summary |
|---|---|
| public void setWrappedToRootException(boolean wrappedToRootException) Wrap runtime exception to YAMLException during parsing or leave them as they are Default is to leave original exceptions
| |