Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Duplicate key processing? #840

Copy link
Copy link
@XIAYM-gh

Description

@XIAYM-gh
Issue body actions

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.)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.