react-native/Examples
Nick Lockwood 7419a82bd7 Handle bad JSON data without crashing
Summary:
public
NSJSONSerialization throws an exception when it encounters bad JSON data, including NaN values, which may not be a programming error.

This diff adds code to catch those exceptions and convert to an error. Also, if no error handling is in place, RCTJSONStringify will now display a redbox, and attempt to recover by sanitizing the JSON data and retrying.

Reviewed By: javache

Differential Revision: D2854778

fb-gh-sync-id: 18e6990af0d91083496d6a0b75c31a94ed9454a5
2016-01-26 06:13:29 -08:00
..
2048 Bugfix - Typos 2015-12-15 09:09:32 -08:00
Movies PixelRatio.pixel() 2016-01-15 05:15:31 -08:00
TicTacToe Remove newline in TicTacToe example 2015-11-30 11:11:24 -08:00
UIExplorer Handle bad JSON data without crashing 2016-01-26 06:13:29 -08:00