Skip to content

Raised a 'invalidJSON' error if initialization JSON data is corrupt.#1052

Open
VarmeLin wants to merge 1 commit intoSwiftyJSON:masterfrom
VarmeLin:damage-inspection
Open

Raised a 'invalidJSON' error if initialization JSON data is corrupt.#1052
VarmeLin wants to merge 1 commit intoSwiftyJSON:masterfrom
VarmeLin:damage-inspection

Conversation

@VarmeLin
Copy link
Copy Markdown

I think you should tell the upper layer of the corrupted JSON data error. And the meaning of ‘null' and corruption is different in JSON, we better distinguish.

  • What behavior was changed?
    Set the error parameter to '.invalidJSON' when JSON parsing was failed.

  • What is the application scenario?
    I need to check the correctness of the JSON file returned from the remote, or I need to check the
    correctness of the JSON file passed in by the upper layer.

Copy link
Copy Markdown

@Naveen-C-Ramachandrappa Naveen-C-Ramachandrappa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes complete sense to have this change to account for invalid json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants