react-native/Examples/UIExplorer/UIExplorerUnitTests
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
..
OCMock [ReactNative] Move unit tests to UIExplorer 2015-06-06 13:38:34 -08:00
Info.plist Increased warning levels to -Wall -Wextra, and fixed Xcode 7 beta issues 2015-06-15 07:52:50 -08:00
LayoutSubviewsOrderingTest.m Bugfix - Typos 2015-12-15 09:09:32 -08:00
RCTAllocationTests.m Re-enable testUnderlyingBridgeIsDeallocated 2016-01-06 09:03:33 -08:00
RCTBridgeTests.m Re-enable testUnderlyingBridgeIsDeallocated 2016-01-06 09:03:33 -08:00
RCTConvert_NSURLTests.m Use mainBundle in RCTConvert to resolve asset paths 2015-11-05 09:30:36 -08:00
RCTConvert_UIFontTests.m Implemented lazy parsing of method signatures to improve TTI 2015-08-11 08:49:13 -08:00
RCTEventDispatcherTests.m Refactored module access to allow for lazy loading 2015-11-25 04:49:45 -08:00
RCTGzipTests.m Re-enable testUnderlyingBridgeIsDeallocated 2016-01-06 09:03:33 -08:00
RCTImageLoaderHelpers.h Generalized image decoding and resizing logic 2016-01-20 11:11:13 -08:00
RCTImageLoaderHelpers.m Generalized image decoding and resizing logic 2016-01-20 11:11:13 -08:00
RCTImageLoaderTests.m Generalized image decoding and resizing logic 2016-01-20 11:11:13 -08:00
RCTImageUtilTests.m Added support for width & height for text images 2016-01-22 11:32:32 -08:00
RCTJSCExecutorTests.m Rename RCTContextExecutor to RCTJSCExecutor 2015-12-16 02:51:28 -08:00
RCTJSONTests.m Handle bad JSON data without crashing 2016-01-26 06:13:29 -08:00
RCTMethodArgumentTests.m Replaced RegExp method parser with recursive descent 2015-12-10 10:12:29 -08:00
RCTModuleMethodTests.m Replaced RegExp method parser with recursive descent 2015-12-10 10:12:29 -08:00
RCTShadowViewTests.m Return viewsWithNewFrame instead of passing it around 2015-11-17 06:37:31 -08:00
RCTUIManagerTests.m Replaced RCTSparseArray with NSDictionary 2015-11-14 10:28:28 -08:00
RCTURLUtilsTests.m Remove `hot` query string attribut when HL is disabled 2016-01-06 11:55:33 -08:00
libOCMock.a [ReactNative] Move unit tests to UIExplorer 2015-06-06 13:38:34 -08:00