|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfacebook4j.internal.org.json.JSONML
public class JSONML
This provides static methods to convert an XML text into a JSONArray or JSONObject, and to covert a JSONArray or JSONObject into an XML text using the JsonML transform.
| Constructor Summary | |
|---|---|
JSONML()
|
|
| Method Summary | |
|---|---|
private static java.lang.Object |
parse(XMLTokener x,
boolean arrayForm,
JSONArray ja)
Parse XML values and store them in a JSONArray. |
static JSONArray |
toJSONArray(java.lang.String string)
Convert a well-formed (but not necessarily valid) XML string into a JSONArray using the JsonML transform. |
static JSONArray |
toJSONArray(XMLTokener x)
Convert a well-formed (but not necessarily valid) XML string into a JSONArray using the JsonML transform. |
static JSONObject |
toJSONObject(java.lang.String string)
Convert a well-formed (but not necessarily valid) XML string into a JSONObject using the JsonML transform. |
static JSONObject |
toJSONObject(XMLTokener x)
Convert a well-formed (but not necessarily valid) XML string into a JSONObject using the JsonML transform. |
static java.lang.String |
toString(JSONArray ja)
Reverse the JSONML transformation, making an XML text from a JSONArray. |
static java.lang.String |
toString(JSONObject jo)
Reverse the JSONML transformation, making an XML text from a JSONObject. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JSONML()
| Method Detail |
|---|
private static java.lang.Object parse(XMLTokener x,
boolean arrayForm,
JSONArray ja)
throws JSONException
x - The XMLTokener containing the source string.arrayForm - true if array form, false if object form.ja - The JSONArray that is containing the current tag or null
if we are at the outermost level.
JSONException
public static JSONArray toJSONArray(java.lang.String string)
throws JSONException
<[ [ ]]> are ignored.
string - The source string.
JSONException
public static JSONArray toJSONArray(XMLTokener x)
throws JSONException
<[ [ ]]> are ignored.
x - An XMLTokener.
JSONException
public static JSONObject toJSONObject(XMLTokener x)
throws JSONException
<[ [ ]]> are ignored.
x - An XMLTokener of the XML source text.
JSONException
public static JSONObject toJSONObject(java.lang.String string)
throws JSONException
<[ [ ]]> are ignored.
string - The XML source text.
JSONException
public static java.lang.String toString(JSONArray ja)
throws JSONException
ja - A JSONArray.
JSONException
public static java.lang.String toString(JSONObject jo)
throws JSONException
jo - A JSONObject.
JSONException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||