/** * Gets the wrapped JSON array or converts the wrapped representation if * needed. * * @return The converted JSON array. * @throws JSONException */ public JSONArray getJsonArray() throws JSONException { if (this.jsonValue != null) { return (JSONArray) this.jsonValue; } return new JSONArray(getJsonText()); }
/** * Gets the wrapped JSON array or converts the wrapped representation if * needed. * * @return The converted JSON array. * @throws JSONException */ public JSONArray getJsonArray() throws JSONException { if (this.jsonValue != null) { return (JSONArray) this.jsonValue; } return new JSONArray(getJsonText()); }
/** * Gets the wrapped JSON object or converts the wrapped representation if * needed. * * @return The converted JSON object. * @throws JSONException */ public JSONObject getJsonObject() throws JSONException { if (this.jsonValue != null) { return (JSONObject) this.jsonValue; } return new JSONObject(getJsonText()); }
/** * Gets the wrapped JSON tokener or converts the wrapped representation if * needed. * * @return The converted JSON tokener. * @throws JSONException */ public JSONTokener getJsonTokener() throws JSONException { if (this.jsonValue != null) { return (JSONTokener) this.jsonValue; } return new JSONTokener(getJsonText()); }
/** * Gets the wrapped JSON object or converts the wrapped representation if * needed. * * @return The converted JSON object. * @throws JSONException */ public JSONObject getJsonObject() throws JSONException { if (this.jsonValue != null) { return (JSONObject) this.jsonValue; } return new JSONObject(getJsonText()); }
/** * Gets the wrapped JSON tokener or converts the wrapped representation if * needed. * * @return The converted JSON tokener. * @throws JSONException */ public JSONTokener getJsonTokener() throws JSONException { if (this.jsonValue != null) { return (JSONTokener) this.jsonValue; } return new JSONTokener(getJsonText()); }
/** * Gets the wrapped JSON array or converts the wrapped representation if * needed. * * @return The converted JSON array. * @throws JSONException */ public JSONArray getJsonArray() throws JSONException { if (this.jsonValue != null) { return (JSONArray) this.jsonValue; } return new JSONArray(getJsonText()); }
/** * Gets the wrapped JSON object or converts the wrapped representation if * needed. * * @return The converted JSON object. * @throws JSONException */ public JSONObject getJsonObject() throws JSONException { if (this.jsonValue != null) { return (JSONObject) this.jsonValue; } return new JSONObject(getJsonText()); }
/** * Gets the wrapped JSON tokener or converts the wrapped representation if * needed. * * @return The converted JSON tokener. * @throws JSONException */ public JSONTokener getJsonTokener() throws JSONException { if (this.jsonValue != null) { return (JSONTokener) this.jsonValue; } return new JSONTokener(getJsonText()); }
@Override public void write(Writer writer) throws IOException { try { writer.write(getJsonText()); } catch (JSONException e) { IOException ioe = new IOException(e.getLocalizedMessage()); ioe.initCause(e.getCause()); throw ioe; } } }
@Override public void write(Writer writer) throws IOException { try { writer.write(getJsonText()); } catch (JSONException e) { IOException ioe = new IOException(e.getLocalizedMessage()); ioe.initCause(e.getCause()); throw ioe; } } }
@Override public void write(Writer writer) throws IOException { try { writer.write(getJsonText()); } catch (JSONException e) { IOException ioe = new IOException(e.getLocalizedMessage()); ioe.initCause(e.getCause()); throw ioe; } } }