public JSONResult get ( String key ) { if ( value instanceof JSONObject ) { JSONObject obj = ( JSONObject ) value ; Object result = obj . get ( key ) ; return new JSONResult ( result ) ; } else if ( value instanceof JSONArray ) { try { int index = Integer . parseInt ( key ) ; return get ( index ) ; } catch ( NumberFormatException e ) { throw createException ( "Excpected JSONObject " + key + ":" ) ; } } return new JSONResult ( null ) ; }
Advance current JSON value to specified value of current JSON object . Set current JSON value to null otherwise .