public class Flat extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_DELIMITER
The default delimiter is used by methods that do not specify a delimiter.
|
| Constructor and Description |
|---|
Flat() |
| Modifier and Type | Method and Description |
|---|---|
static String |
flatten(org.json.JSONObject jsonObject)
This method flattens the given JSON object.
|
static String |
flatten(org.json.JSONObject jsonObject,
String delimiter)
This method flattens the given JSON object.
|
static String |
flatten(String jsonString)
This method flattens the string representation of the JSON object.
|
static String |
flatten(String jsonString,
String delimiter)
This method flattens the string representation of the JSON object.
|
static org.json.JSONObject |
flattenToJSONObject(org.json.JSONObject jsonObject)
This method flattens the given JSON object.
|
static org.json.JSONObject |
flattenToJSONObject(org.json.JSONObject jsonObject,
String delimiter)
This method flattens the string representation of the JSON object.
|
static org.json.JSONObject |
flattenToJSONObject(String jsonString)
This method flattens the string representation of the JSON object.
|
static org.json.JSONObject |
flattenToJSONObject(String jsonString,
String delimiter)
This method flattens the string representation of the JSON object.
|
static String |
unflatten(org.json.JSONObject flatJsonObject)
This method takes a flattened JSON object and returns it to
the conventional format.
|
static String |
unflatten(org.json.JSONObject flatJsonObject,
String delimiter)
This method takes a flattened JSON object and returns it to
the conventional format.
|
static String |
unflatten(String flatJsonString)
This method takes the string representation of a flattened JSON object
and returns it to the conventional format.
|
static String |
unflatten(String flatJsonString,
String delimiter)
This method takes the string representation of a flattened JSON object
and returns it to the conventional format.
|
static org.json.JSONObject |
unflattenToJSONObject(org.json.JSONObject flatJsonObject)
This method takes a flattened JSON object and returns it to
the conventional format.
|
static org.json.JSONObject |
unflattenToJSONObject(org.json.JSONObject flatJsonObject,
String delimiter)
This method takes a flattened JSON object and returns it to
the conventional format.
|
static org.json.JSONObject |
unflattenToJSONObject(String flatJsonObject)
This method takes the string representation of a flattened JSON object
and returns it to the conventional format.
|
static org.json.JSONObject |
unflattenToJSONObject(String flatJsonString,
String delimiter)
This method takes the string representation of a flattened JSON object
and returns it to the conventional format.
|
public static final String DEFAULT_DELIMITER
public static String flatten(org.json.JSONObject jsonObject) throws org.json.JSONException
jsonObject - the JSON object to flattenorg.json.JSONExceptionpublic static String flatten(String jsonString) throws org.json.JSONException
jsonString - the string representation of the JSON object.org.json.JSONException - when the given string cannot be parsed to a JSON object.public static String flatten(org.json.JSONObject jsonObject, String delimiter) throws org.json.JSONException
jsonObject - the JSON object to flattendelimiter - the delimiter to use when joining the keys.org.json.JSONExceptionpublic static String flatten(String jsonString, String delimiter) throws org.json.JSONException
jsonString - the string representation of the JSON object.delimiter - the delimiter to use when joining the keys.org.json.JSONException - when the given string cannot be parsed to a JSON object.public static org.json.JSONObject flattenToJSONObject(String jsonString) throws org.json.JSONException
jsonString - the string representation of the JSON object.org.json.JSONException - when the given string cannot be parsed to a JSON object.public static org.json.JSONObject flattenToJSONObject(org.json.JSONObject jsonObject)
throws org.json.JSONException
jsonObject - the JSON object to flatten.org.json.JSONExceptionpublic static org.json.JSONObject flattenToJSONObject(String jsonString, String delimiter) throws org.json.JSONException
jsonString - the string representation of the JSON object.delimiter - the delimiter to use when joining the keys.org.json.JSONException - when the given string cannot be parsed to a JSON object.public static org.json.JSONObject flattenToJSONObject(org.json.JSONObject jsonObject,
String delimiter)
throws org.json.JSONException
jsonObject - the JSON object to flatten.delimiter - the delimiter to use when joining the keys.org.json.JSONExceptionpublic static String unflatten(String flatJsonString) throws org.json.JSONException
flatJsonString - the string representation of the JSON object.org.json.JSONException - when the given string cannot be parsed to a JSON object.public static String unflatten(org.json.JSONObject flatJsonObject) throws org.json.JSONException
flatJsonObject - the JSON object to unflatten.org.json.JSONExceptionpublic static String unflatten(String flatJsonString, String delimiter) throws org.json.JSONException
flatJsonString - the JSON object to unflatten.delimiter - the delimiter to use when splitting the keys.org.json.JSONException - when the given string cannot be parsed to a JSON object.public static String unflatten(org.json.JSONObject flatJsonObject, String delimiter) throws org.json.JSONException
flatJsonObject - the JSON object to unflatten.delimiter - the delimiter to use when splitting the keys.org.json.JSONExceptionpublic static org.json.JSONObject unflattenToJSONObject(String flatJsonObject) throws org.json.JSONException
flatJsonString - the string representation of the JSON object.org.json.JSONException - when the given string cannot be parsed to a JSON object.public static org.json.JSONObject unflattenToJSONObject(org.json.JSONObject flatJsonObject)
throws org.json.JSONException
flatJsonObject - the JSON object to unflatten.org.json.JSONExceptionpublic static org.json.JSONObject unflattenToJSONObject(String flatJsonString, String delimiter) throws org.json.JSONException
flatJsonString - the JSON object to unflatten.delimiter - the delimiter to use when splitting the keys.org.json.JSONException - when the given string cannot be parsed to a JSON object.public static org.json.JSONObject unflattenToJSONObject(org.json.JSONObject flatJsonObject,
String delimiter)
throws org.json.JSONException
flatJsonObject - the JSON object to unflatten.delimiter - the delimiter to use when splitting the keys.org.json.JSONExceptionCopyright © 2016. All rights reserved.