mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-1764 (Simplified Relationship View)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@90782 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -295,4 +295,28 @@ public final class WebScriptUtils
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a json object from the given {@link String}
|
||||
*
|
||||
* @param json The json object as {@link String}
|
||||
* @return The json object created from the given {@link String}
|
||||
*/
|
||||
public static JSONObject createJSONObject(String json)
|
||||
{
|
||||
mandatory("json", json);
|
||||
|
||||
JSONObject jsonObject;
|
||||
|
||||
try
|
||||
{
|
||||
jsonObject = new JSONObject(json);
|
||||
}
|
||||
catch (JSONException error)
|
||||
{
|
||||
throw new WebScriptException(Status.STATUS_BAD_REQUEST, "Cannot create a json object from the given string '" + json + "'.", error);
|
||||
}
|
||||
|
||||
return jsonObject;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user