Package edu.uiuc.ncsa.security.util.json
Class PreProcessor
- java.lang.Object
-
- edu.uiuc.ncsa.security.util.json.PreProcessor
-
public class PreProcessor extends Object
This is a pre-processor for JSON objects. The contract of this is as follows. A JSON object may have an attribute that is one of these directives, the argument is then applied.Example
{ "foo":"bar", "#import":"id" }
This means that the JSON with "id" is imported andCreated by Jeff Gaynor
on 2/15/19 at 4:11 PM
-
-
Field Summary
Fields Modifier and Type Field Description static String
IMPORT_DIRECTIVE
-
Constructor Summary
Constructors Constructor Description PreProcessor(JSONStore<? extends JSONEntry> store)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description net.sf.json.JSON
execute(net.sf.json.JSONArray array)
protected net.sf.json.JSON
execute(net.sf.json.JSONArray array, Set<String> ids)
This will track the ids and throw an exception if there is cycle.net.sf.json.JSON
execute(net.sf.json.JSONObject object)
net.sf.json.JSON
execute(net.sf.json.JSONObject object, Set<String> ids)
JSONStore<? extends JSONEntry>
getStore()
-
-
-
Field Detail
-
IMPORT_DIRECTIVE
public static String IMPORT_DIRECTIVE
-
-
Method Detail
-
execute
protected net.sf.json.JSON execute(net.sf.json.JSONArray array, Set<String> ids)
This will track the ids and throw an exception if there is cycle.- Parameters:
array
-ids
-- Returns:
-
execute
public net.sf.json.JSON execute(net.sf.json.JSONArray array)
-
execute
public net.sf.json.JSON execute(net.sf.json.JSONObject object)
-
-