org.yaml.snakeyaml
Class LoaderOptions
java.lang.Object
org.yaml.snakeyaml.LoaderOptions
public class LoaderOptions
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LoaderOptions
public LoaderOptions()
isAllowDuplicateKeys
public boolean isAllowDuplicateKeys()
setAllowDuplicateKeys
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
- Parameters:
allowDuplicateKeys - false to reject duplicate mapping keys
Copyright © 2008–2017. All rights reserved.