Description
to me it was counter intuitive to create a default configured JSONParserConfiguration
to then call withStrictMode()
on it returning a clone and making the first instance obsolete. I would even need to create multiple clones until I have the correct configuration, when I want to set multiple values. I would like to be able to create my desired configuration in one go.
This would require a Constructor JSONParserConfiguration(boolean overwriteDuplicateKey, boolean strictMode)
or even JSONParserConfiguration(boolean overwriteDuplicateKey, boolean strictMode, boolean keepStrings, int maxNestingDepth)
.
I would also allow the make the configuration fiels final
although that would be a backwards compatible breaking change, and therefore will most probably not be added. I would make it reasier to reason about the codes behaviour and avoid the potential of changing an already used configuration.
What do you think of it?