-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
Currently, the JSON library simply throws JSONException when meeting duplicate keys, although most of the time it doesn't happen, but it's inconvenient when I want to process some imperfect JSON data.
So I think it's a good idea to add some methods to set the processing strategy, decides whether to override or skip or throw a exception.
Um, I think the method can be added to the constructor, just like the following code:
new JSONObject(jsonStr, DuplicateStrategy.OVERRIDE);(My native language isn't English, so maybe there're some grammar mistakes, thanks.)