SwiftyJSON
SwiftyJSON copied to clipboard
Raised a 'invalidJSON' error if initialization JSON data is corrupt.
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.