|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.util.JSONtoFmModel
public final class JSONtoFmModel
Utility to convert JSON to Freemarker-compatible data model
Field Summary | |
---|---|
static boolean |
autoConvertISO8601
|
static java.lang.String |
ROOT_ARRAY
|
Constructor Summary | |
---|---|
JSONtoFmModel()
|
Method Summary | |
---|---|
static java.util.List |
convertJSONArrayToList(org.json.JSONArray ja)
JSONArray is an ordered sequence of values -> convert to List (equivalent to Freemarker "sequence") |
static java.util.Map |
convertJSONArrayToMap(java.lang.String jsonString)
Convert JSON Array string to Freemarker-compatible data model |
static java.util.Map |
convertJSONObjectToMap(org.json.JSONObject jo)
JSONObject is an unordered collection of name/value pairs -> convert to Map (equivalent to Freemarker "hash") |
static java.util.Map |
convertJSONObjectToMap(java.lang.String jsonString)
Convert JSON Object string to Freemarker-compatible data model |
static java.lang.String |
toString(java.util.Map map)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String ROOT_ARRAY
public static boolean autoConvertISO8601
Constructor Detail |
---|
public JSONtoFmModel()
Method Detail |
---|
public static java.util.Map convertJSONObjectToMap(java.lang.String jsonString) throws org.json.JSONException
jsonString
-
org.json.JSONException
public static java.util.Map convertJSONObjectToMap(org.json.JSONObject jo) throws org.json.JSONException
org.json.JSONException
public static java.util.Map convertJSONArrayToMap(java.lang.String jsonString) throws org.json.JSONException
jsonString
-
org.json.JSONException
public static java.util.List convertJSONArrayToList(org.json.JSONArray ja) throws org.json.JSONException
org.json.JSONException
public static java.lang.String toString(java.util.Map map)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |