public class

JsonUtils

extends Object
java.lang.Object
   ↳ com.pdftron.collab.utils.JsonUtils

Summary

Public Constructors
JsonUtils()
Public Methods
static String addItemToArray(String jsonString, String item)
static JSONArray addItemToArrayImpl(String jsonString, String item)
static boolean isValidDeleteEntity(JSONObject annotJson)
static boolean isValidInsertEntity(JSONObject annotJson)
Check against whether the json passed in is a valid annotation
static boolean isValidUpdateEntity(JSONObject annotJson)
static AnnotationEntity parseRetrieveMessage(JSONObject annotJson, String docId)
static String removeAllItemFromArray(String jsonString, String item)
static String removeItemFromArray(String jsonString, String item)
static JSONArray removeItemFromArrayImpl(String jsonString, String item)
static int safeGetJsonArrayLength(String jsonString)
static JSONArray safeRemoveByValue(JSONArray jsonArray, String item)
static JSONArray safeRemoveFirstByValue(JSONArray jsonArray, String item)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public JsonUtils ()

Public Methods

public static String addItemToArray (String jsonString, String item)

Throws
JSONException

public static JSONArray addItemToArrayImpl (String jsonString, String item)

Throws
JSONException

public static boolean isValidDeleteEntity (JSONObject annotJson)

public static boolean isValidInsertEntity (JSONObject annotJson)

Check against whether the json passed in is a valid annotation

public static boolean isValidUpdateEntity (JSONObject annotJson)

public static AnnotationEntity parseRetrieveMessage (JSONObject annotJson, String docId)

public static String removeAllItemFromArray (String jsonString, String item)

Throws
JSONException

public static String removeItemFromArray (String jsonString, String item)

Throws
JSONException

public static JSONArray removeItemFromArrayImpl (String jsonString, String item)

Throws
JSONException

public static int safeGetJsonArrayLength (String jsonString)

public static JSONArray safeRemoveByValue (JSONArray jsonArray, String item)

public static JSONArray safeRemoveFirstByValue (JSONArray jsonArray, String item)