static void handleException( Exception ex ) { throw new JsonException( ex ); }
@Test public void testArrayOfArrayWithSimpleValuesValue5() { try { List list = (List) jsonParserAndMapper.parse("[1"); die(); } catch (JsonException jsonException) { jsonException.printStackTrace (); } }
@Test public void testArrayOfArrayWithSimpleValuesValue6() { try { List list = (List) jsonParserAndMapper.parse("[1,"); die(); } catch (JsonException jsonException) { jsonException.printStackTrace (); } } @Test
static void handleException( Exception ex ) { throw new JsonException( ex ); }
@Test public void testArrayOfArrayWithSimpleValuesValue2() { try { List list = (List) jsonParserAndMapper.parse("["); die(); } catch (JsonException jsonException) { jsonException.printStackTrace(); } }
static void handleException( Exception ex ) { throw new JsonException( ex ); }
@Test public void testBackSlashEscaping2() { Object obj = null; boolean ok = false; //obj = parser().parse("{\"a\":\"\\\\\\\\\" }"); //ok = obj.equals ( Maps.map ( "a", "\\\\") ) || die ("" + obj); obj = parser().parse("{\"a\":\"C:\\\\\\\"Documents and Settings\\\"\\\\\"}"); Object obj2 = Maps.map("a", "C:\\\"Documents and Settings\"\\"); ok = obj.equals ( obj2 ) || die ("" + obj); String str = "{\"a\":\"c:\\\\\\\\GROOVY5144\\\\\\\\\",\"y\":\"z\"}"; obj = parser().parse(str); obj2 = Maps.map("a","c:\\\\GROOVY5144\\\\", "y", "z"); ok = obj.equals ( obj2 ) || die ("" + obj); str = "[\"c:\\\\\\\\GROOVY5144\\\\\\\\\",\"d\"]"; obj = parser().parse( str ); obj2 = Lists.list("c:\\\\GROOVY5144\\\\", "d"); ok = obj.equals ( obj2 ) || die ("" + obj); str = "{\"a\":\"c:\\\\\\\"}"; try { parser().parse( str ); die(); } catch ( JsonException ex ) { ex.printStackTrace(); } }
protected final Object decodeNull() { if ( __index + NULL.length <= charArray.length ) { if ( charArray[ __index ] == 'n' && charArray[ ++__index ] == 'u' && charArray[ ++__index ] == 'l' && charArray[ ++__index ] == 'l' ) { __index++; return null; } } throw new JsonException( exceptionDetails( "null not parse properly" ) ); }
protected final Object decodeNull() { if ( __index + NULL.length <= charArray.length ) { if ( charArray[ __index ] == 'n' && charArray[ ++__index ] == 'u' && charArray[ ++__index ] == 'l' && charArray[ ++__index ] == 'l' ) { __index++; return null; } } throw new JsonException( exceptionDetails( "null not parse properly" ) ); }
protected final boolean decodeTrue() { if ( __index + TRUE.length <= charArray.length ) { if ( charArray[ __index ] == 't' && charArray[ ++__index ] == 'r' && charArray[ ++__index ] == 'u' && charArray[ ++__index ] == 'e' ) { __index++; return true; } } throw new JsonException( exceptionDetails( "true not parsed properly" ) ); }
protected final boolean decodeFalse() { if ( __index + FALSE.length <= charArray.length ) { if ( charArray[ __index ] == 'f' && charArray[ ++__index ] == 'a' && charArray[ ++__index ] == 'l' && charArray[ ++__index ] == 's' && charArray[ ++__index ] == 'e' ) { __index++; return false; } } throw new JsonException( exceptionDetails( "false not parsed properly" ) ); }
protected final Object decodeNull() { if ( __index + NULL.length <= charArray.length ) { if ( charArray[ __index ] == 'n' && charArray[ ++__index ] == 'u' && charArray[ ++__index ] == 'l' && charArray[ ++__index ] == 'l' ) { __index++; return null; } } throw new JsonException( exceptionDetails( "null not parse properly" ) ); }
protected final boolean decodeTrue() { if ( __index + TRUE.length <= charArray.length ) { if ( charArray[ __index ] == 't' && charArray[ ++__index ] == 'r' && charArray[ ++__index ] == 'u' && charArray[ ++__index ] == 'e' ) { __index++; return true; } } throw new JsonException( exceptionDetails( "true not parsed properly" ) ); }
protected final boolean decodeTrue() { if ( __index + TRUE.length <= charArray.length ) { if ( charArray[ __index ] == 't' && charArray[ ++__index ] == 'r' && charArray[ ++__index ] == 'u' && charArray[ ++__index ] == 'e' ) { __index++; return true; } } throw new JsonException( exceptionDetails( "true not parsed properly" ) ); }
protected final void complain( String complaint ) { throw new JsonException( exceptionDetails( complaint ) ); }
protected final void complain( String complaint ) { throw new JsonException( exceptionDetails( complaint ) ); }
protected final void complain( String complaint ) { throw new JsonException( exceptionDetails( complaint ) ); }
protected final boolean decodeFalse() { if ( __index + FALSE.length <= charArray.length ) { if ( charArray[ __index ] == 'f' && charArray[ ++__index ] == 'a' && charArray[ ++__index ] == 'l' && charArray[ ++__index ] == 's' && charArray[ ++__index ] == 'e' ) { __index++; return false; } } throw new JsonException( exceptionDetails( "false not parsed properly" ) ); }
protected final void complain( String complaint ) { throw new JsonException( exceptionDetails( complaint ) ); }
protected final boolean decodeFalse() { if ( __index + FALSE.length <= charArray.length ) { if ( charArray[ __index ] == 'f' && charArray[ ++__index ] == 'a' && charArray[ ++__index ] == 'l' && charArray[ ++__index ] == 's' && charArray[ ++__index ] == 'e' ) { __index++; return false; } } throw new JsonException( exceptionDetails( "false not parsed properly" ) ); }