Uses of Class
org.apache.sling.commons.json.JSONException

Packages that use JSONException
org.apache.sling.commons.json   
org.apache.sling.commons.json.http   
org.apache.sling.commons.json.io   
org.apache.sling.commons.json.jcr   
org.apache.sling.commons.json.util   
org.apache.sling.commons.json.xml   
org.apache.sling.jcr.contentloader.internal.readers   
org.apache.sling.launchpad.webapp.integrationtest The tests found in and under this package are used in the "integration-test" build phase (SLING-82), they are not run as part of the normal "test" build phase. 
org.apache.sling.launchpad.webapp.integrationtest.accessManager   
org.apache.sling.launchpad.webapp.integrationtest.servlets.post   
org.apache.sling.launchpad.webapp.integrationtest.userManager   
org.apache.sling.servlets.get.impl.helpers   
 

Uses of JSONException in org.apache.sling.commons.json
 

Methods in org.apache.sling.commons.json that return JSONException
 JSONException JSONTokener.syntaxError(String message)
          Make a JSONException to signal a syntax error.
 

Methods in org.apache.sling.commons.json that throw JSONException
 JSONObject JSONObject.accumulate(String key, Object value)
          Accumulate values under a key.
 JSONObject JSONObject.append(String key, Object value)
          Append values to the array under a key.
 Object JSONArray.get(int index)
          Get the object value associated with an index.
 Object JSONObject.get(String key)
          Get the value object associated with a key.
 boolean JSONArray.getBoolean(int index)
          Get the boolean value associated with an index.
 boolean JSONObject.getBoolean(String key)
          Get the boolean value associated with a key.
 double JSONArray.getDouble(int index)
          Get the double value associated with an index.
 double JSONObject.getDouble(String key)
          Get the double value associated with a key.
 int JSONArray.getInt(int index)
          Get the int value associated with an index.
 int JSONObject.getInt(String key)
          Get the int value associated with a key.
 JSONArray JSONArray.getJSONArray(int index)
          Get the JSONArray associated with an index.
 JSONArray JSONObject.getJSONArray(String key)
          Get the JSONArray value associated with a key.
 JSONObject JSONArray.getJSONObject(int index)
          Get the JSONObject associated with an index.
 JSONObject JSONObject.getJSONObject(String key)
          Get the JSONObject value associated with a key.
 long JSONArray.getLong(int index)
          Get the long value associated with an index.
 long JSONObject.getLong(String key)
          Get the long value associated with a key.
 String JSONArray.getString(int index)
          Get the string associated with an index.
 String JSONObject.getString(String key)
          Get the string associated with a key.
 String JSONArray.join(String separator)
          Make a string from the contents of this JSONArray.
 char JSONTokener.next(char c)
          Consume the next character, and check that it matches a specified character.
 String JSONTokener.next(int n)
          Get the next n characters.
 char JSONTokener.nextClean()
          Get the next char in the string, skipping whitespace and comments (slashslash, slashstar, and hash).
 String JSONTokener.nextString(char quote)
          Return the characters up to the next close quote character.
 Object JSONTokener.nextValue()
          Get the next value.
static String JSONObject.numberToString(Number n)
          Produce a string from a Number.
 JSONArray JSONArray.put(double value)
          Append a double value.
 JSONArray JSONArray.put(int index, boolean value)
          Put or replace a boolean value in the JSONArray.
 JSONArray JSONArray.put(int index, Collection<?> value)
          Put a value in the JSONArray, where the value will be a JSONArray which is produced from a Collection.
 JSONArray JSONArray.put(int index, double value)
          Put or replace a double value.
 JSONArray JSONArray.put(int index, int value)
          Put or replace an int value.
 JSONArray JSONArray.put(int index, long value)
          Put or replace a long value.
 JSONArray JSONArray.put(int index, Map<String,?> value)
          Put a value in the JSONArray, where the value will be a JSONObject which is produced from a Map.
 JSONArray JSONArray.put(int index, Object value)
          Put or replace an object value in the JSONArray.
 JSONObject JSONObject.put(String key, boolean value)
          Put a key/boolean pair in the JSONObject.
 JSONObject JSONObject.put(String key, Collection<?> value)
          Put a key/value pair in the JSONObject, where the value will be a JSONArray which is produced from a Collection.
 JSONObject JSONObject.put(String key, double value)
          Put a key/double pair in the JSONObject.
 JSONObject JSONObject.put(String key, int value)
          Put a key/int pair in the JSONObject.
 JSONObject JSONObject.put(String key, long value)
          Put a key/long pair in the JSONObject.
 JSONObject JSONObject.put(String key, Map<String,?> value)
          Put a key/value pair in the JSONObject, where the value will be a JSONObject which is produced from a Map.
 JSONObject JSONObject.put(String key, Object value)
          Put a key/value pair in the JSONObject.
 JSONObject JSONObject.putOpt(String key, Object value)
          Put a key/value pair in the JSONObject, but only if the key and the value are both non-null.
 JSONArray JSONObject.toJSONArray(JSONArray names)
          Produce a JSONArray containing the values of the members of this JSONObject.
 JSONObject JSONArray.toJSONObject(JSONArray names)
          Produce a JSONObject by combining a JSONArray of names with the values of this JSONArray.
 String JSONObject.toString(int indentFactor)
          Make a prettyprinted JSON text of this JSONObject.
 String JSONArray.toString(int indentFactor)
          Make a prettyprinted JSON text of this JSONArray.
static String JSONObject.valueToString(Object value)
          Make a JSON text of an Object value.
 Writer JSONObject.write(Writer writer)
          Write the contents of the JSONObject as JSON text to a writer.
 Writer JSONArray.write(Writer writer)
          Write the contents of the JSONArray as JSON text to a writer.
 

Constructors in org.apache.sling.commons.json that throw JSONException
JSONArray(JSONTokener x)
          Construct a JSONArray from a JSONTokener.
JSONArray(String string)
          Construct a JSONArray from a source sJSON text.
JSONObject(JSONObject jo, String[] sa)
          Construct a JSONObject from a subset of another JSONObject.
JSONObject(JSONTokener x)
          Construct a JSONObject from a JSONTokener.
JSONObject(String string)
          Construct a JSONObject from a string.
 

Uses of JSONException in org.apache.sling.commons.json.http
 

Methods in org.apache.sling.commons.json.http that throw JSONException
 String HTTPTokener.nextToken()
          Get the next token or string.
static JSONObject Cookie.toJSONObject(String string)
          Convert a cookie specification string into a JSONObject.
static JSONObject HTTP.toJSONObject(String string)
          Convert an HTTP header string into a JSONObject.
static JSONObject CookieList.toJSONObject(String string)
          Convert a cookie list into a JSONObject.
static String Cookie.toString(JSONObject o)
          Convert a JSONObject into a cookie specification string.
static String HTTP.toString(JSONObject o)
          Convert a JSONObject into an HTTP header.
static String CookieList.toString(JSONObject o)
          Convert a JSONObject into a cookie list.
 

Uses of JSONException in org.apache.sling.commons.json.io
 

Methods in org.apache.sling.commons.json.io that throw JSONException
 JSONWriter JSONWriter.array()
          Begin appending a new array.
 JSONWriter JSONWriter.endArray()
          End an array.
 JSONWriter JSONWriter.endObject()
          End an object.
 JSONWriter JSONWriter.key(String s)
          Append a key.
 JSONWriter JSONWriter.object()
          Begin appending a new object.
 JSONWriter JSONWriter.value(boolean b)
          Append either the value true or the value false.
 JSONWriter JSONWriter.value(double d)
          Append a double value.
 JSONWriter JSONWriter.value(long l)
          Append a long value.
 JSONWriter JSONWriter.value(Object o)
          Append an object value.
 

Uses of JSONException in org.apache.sling.commons.json.jcr
 

Methods in org.apache.sling.commons.json.jcr that throw JSONException
protected  void JsonJcrNode.addProperty(javax.jcr.Property p)
           
protected  void JsonJcrNode.addValue(String key, javax.jcr.Value v)
           
 void JsonItemWriter.dump(javax.jcr.NodeIterator it, Writer out)
          Dump all Nodes of given NodeIterator in JSON
protected  void JsonItemWriter.dump(javax.jcr.Node node, JSONWriter w, int currentRecursionLevel, int maxRecursionLevels)
          Dump given node in JSON, optionally recursing into its child nodes
 void JsonItemWriter.dump(javax.jcr.Node node, Writer w, int maxRecursionLevels)
          Dump given node in JSON, optionally recursing into its child nodes
 void JsonItemWriter.dump(javax.jcr.Node node, Writer w, int maxRecursionLevels, boolean tidy)
          Dump given node in JSON, optionally recursing into its child nodes
 void JsonItemWriter.dump(javax.jcr.Property p, Writer w)
          Dump given property in JSON
protected  void JsonItemWriter.dumpSingleNode(javax.jcr.Node n, JSONWriter w, int currentRecursionLevel, int maxRecursionLevels)
          Dump a single node
protected  void JsonItemWriter.dumpValue(JSONWriter w, javax.jcr.Value v)
          Writes the given value to the JSON writer.
protected  void JsonItemWriter.writeProperty(JSONWriter w, javax.jcr.Property p)
          Write a single property
 

Constructors in org.apache.sling.commons.json.jcr that throw JSONException
JsonJcrNode(javax.jcr.Node node)
          Creates a JSONObject out of node.
JsonJcrNode(javax.jcr.Node node, Set<String> propertyNamesToIgnore)
          Creates a JSONObject out of node.
 

Uses of JSONException in org.apache.sling.commons.json.util
 

Methods in org.apache.sling.commons.json.util that throw JSONException
static JSONArray CDL.rowToJSONArray(JSONTokener x)
          Produce a JSONArray of strings from a row of comma delimited values.
static JSONObject CDL.rowToJSONObject(JSONArray names, JSONTokener x)
          Produce a JSONObject from a row of comma delimited text, using a parallel JSONArray of strings to provides the names of the elements.
static JSONArray CDL.toJSONArray(JSONArray names, JSONTokener x)
          Produce a JSONArray of JSONObjects from a comma delimited text string using a supplied JSONArray as the source of element names.
static JSONArray CDL.toJSONArray(JSONArray names, String string)
          Produce a JSONArray of JSONObjects from a comma delimited text string using a supplied JSONArray as the source of element names.
static JSONArray CDL.toJSONArray(JSONTokener x)
          Produce a JSONArray of JSONObjects from a comma delimited text string, using the first row as a source of names.
static JSONArray CDL.toJSONArray(String string)
          Produce a JSONArray of JSONObjects from a comma delimited text string, using the first row as a source of names.
static String CDL.toString(JSONArray ja)
          Produce a comma delimited text from a JSONArray of JSONObjects.
static String CDL.toString(JSONArray names, JSONArray ja)
          Produce a comma delimited text from a JSONArray of JSONObjects using a provided list of names.
static void Validator.validate(JSONTokener x)
          Strictly validate the JSON text
static void Validator.validate(String text)
          Strictly validate the JSON text
 

Uses of JSONException in org.apache.sling.commons.json.xml
 

Methods in org.apache.sling.commons.json.xml that throw JSONException
 String XMLTokener.nextCDATA()
          Get the text in the CDATA block.
 Object XMLTokener.nextContent()
          Get the next XML outer token, trimming whitespace.
 Object XMLTokener.nextEntity(char a)
          Return the next entity.
 Object XMLTokener.nextMeta()
          Returns the next XML meta token.
 Object XMLTokener.nextToken()
          Get the next XML Token.
static JSONObject XML.toJSONObject(String string)
          Convert a well-formed (but not necessarily valid) XML string into a JSONObject.
static String XML.toString(Object o)
          Convert a JSONObject into a well-formed, element-normal XML string.
static String XML.toString(Object o, String tagName)
          Convert a JSONObject into a well-formed, element-normal XML string.
 

Uses of JSONException in org.apache.sling.jcr.contentloader.internal.readers
 

Methods in org.apache.sling.jcr.contentloader.internal.readers that throw JSONException
protected  void JsonReader.createAce(JSONObject ace, ContentCreator contentCreator)
          Create or update an access control entry
protected  void JsonReader.createAcl(Object obj, ContentCreator contentCreator)
          Create or update one or more access control entries for the current node.
protected  void JsonReader.createNode(String name, JSONObject obj, ContentCreator contentCreator)
           
protected  void JsonReader.createPrincipal(JSONObject json, ContentCreator contentCreator)
          Create or update a user or group
protected  void JsonReader.createPrincipals(Object obj, ContentCreator contentCreator)
          Create or update one or more user and/or groups { "security:principals" : [ { "name":"owner", "isgroup":"true", "members":[], "dynamic":"true" } ], }
protected  void JsonReader.createProperty(String name, Object value, ContentCreator contentCreator)
           
 

Uses of JSONException in org.apache.sling.launchpad.webapp.integrationtest
 

Methods in org.apache.sling.launchpad.webapp.integrationtest that throw JSONException
 void BundleContentTest.testBundleContentParentFromMultipleBundles()
          Test fix for SLING-1733 - BundleResourceProvider fails to find resources when multiple bundles have the same Sling-Bundle-Resources path
 void RedirectTest.testRedirectJson()
          test JSON result for .json requests with sling:target
 void RedirectTest.testRedirectJson2()
          test JSON result for .json requests with sling:target
 void JsonQueryServletTest.testTidyResultFormat()
          Test for SLING-1632: tidy rendering of query results
 

Uses of JSONException in org.apache.sling.launchpad.webapp.integrationtest.accessManager
 

Methods in org.apache.sling.launchpad.webapp.integrationtest.accessManager that throw JSONException
 void ModifyAceTest.testAddAceOrderByAfter()
          Test to verify adding an ACE after an existing ACE the ACL
 void ModifyAceTest.testAddAceOrderByBefore()
          Test to verify adding an ACE before an existing ACE the ACL
 void ModifyAceTest.testAddAceOrderByFirst()
          Test to verify adding an ACE in the first position of the ACL
 void ModifyAceTest.testAddAceOrderByLast()
          Test to verify adding an ACE at the end the ACL
 void ModifyAceTest.testAddAceOrderByNumeric()
          Test to verify adding an ACE at a specific index inside the ACL
 void PrivilegesInfoTest.testDeniedWriteForGroup()
           
 void PrivilegesInfoTest.testDeniedWriteForUser()
           
 void PrivilegesInfoTest.testGrantedWriteForGroup()
           
 void PrivilegesInfoTest.testGrantedWriteForUser()
           
 void ModifyAceTest.testMergeAceForUser()
          Test for SLING-997, preserve privileges that were not posted with the modifyAce request.
 void ModifyAceTest.testMergeAceForUserCombineAggregatePrivilege()
          Test for SLING-997, preserve privileges that were not posted with the modifyAce request.
 void ModifyAceTest.testMergeAceForUserDenyPrivilegeAfterGrantPrivilege()
          Test ACE update with a deny privilege for an ACE that already contains a grant privilege
 void ModifyAceTest.testMergeAceForUserSplitAggregatePrincipal()
          Test for SLING-997, preserve privileges that were not posted with the modifyAce request.
 void ModifyAceTest.testModifyAceForGroup()
           
 void ModifyAceTest.testModifyAceForUser()
           
 void ModifyAceTest.testModifyAceResponseAsJSON()
          Test for SLING-1677
 void RemoveAcesTest.testRemoveAce()
           
 void RemoveAcesTest.testRemoveAces()
           
 void RemoveAcesTest.testRemoveAcesResponseAsJSON()
          Test for SLING-1677
 void ModifyAceTest.testUpdateAcePreservePosition()
          Test to make sure modifying an existing ace without changing the order leaves the ACE in the same position in the ACL
 

Uses of JSONException in org.apache.sling.launchpad.webapp.integrationtest.servlets.post
 

Methods in org.apache.sling.launchpad.webapp.integrationtest.servlets.post that throw JSONException
protected  void PostServletImportTest.assertExpectedJSON(JSONObject expectedJson, JSONObject actualJson)
           
protected  String PostServletImportTest.importNodeWithExactName(String testNodeName)
           
 void PostServletImportTest.testImportCheckinNodes()
          Test import operation which checks in versionable nodes.
 void PostServletImportTest.testImportJarFromFile()
           
 void PostServletImportTest.testImportJCRXMLFromFile()
           
 void PostServletImportTest.testImportJSONFromFile()
          Test import operation for a posted json file
 void PostServletImportTest.testImportJSONFromFileWithoutOptionalName()
          Test import operation for a posted json file without the optional name
 void PostServletImportTest.testImportJSONFromRequestParam()
          Test import operation for a posted json string
 void PostServletImportTest.testImportJSONFromRequestParamWithoutOptionalName()
          Test import operation for a posted json string without the optional name
 void PostServletImportTest.testImportNodeWithAlreadyUsedExactName()
          SLING-1091: test error reporting when attempting to import a node with an already used node name.
 void PostServletImportTest.testImportNodeWithExactName()
          SLING-1091: test create node with an exact node name (no filtering)
 void PostServletImportTest.testImportReplace()
          Test import operation which replaces existing content
 void PostServletImportTest.testImportReplaceProperties()
          SLING-1627: test import of content over existing content with the ':replaceProperties" parameter set and the ":replace" property not set.
 void PostServletImportTest.testImportXMLFromFile()
           
 void PostServletImportTest.testImportXMLFromFileWithoutOptionalName()
           
 void PostServletImportTest.testImportXMLFromRequestParam()
           
 void PostServletImportTest.testImportXMLFromRequestParamWithoutOptionalName()
           
 void PostServletImportTest.testImportZipFromFile()
           
 void PostServletUpdateTest.testMixinTypes()
           
 void PostServletUpdateTest.testUpdatePropertyPrivilegesAndEvents()
          Test for SLING-897 fix: 1.
 

Uses of JSONException in org.apache.sling.launchpad.webapp.integrationtest.userManager
 

Methods in org.apache.sling.launchpad.webapp.integrationtest.userManager that throw JSONException
 void PrivilegesInfoTest.testCanAddGroup()
          Checks whether the current user has been granted privileges to add a new group.
 void PrivilegesInfoTest.testCanAddUser()
          Checks whether the current user has been granted privileges to add a new user.
 void PrivilegesInfoTest.testCanRemoveGroup()
          Checks whether the current user has been granted privileges to remove the specified group.
 void PrivilegesInfoTest.testCanRemoveUser()
          Checks whether the current user has been granted privileges to remove the specified user.
 void PrivilegesInfoTest.testCanUpdateGroupMembers()
          Checks whether the current user has been granted privileges to update the membership of the specified group.
 void PrivilegesInfoTest.testCanUpdateGroupProperties()
          Checks whether the current user has been granted privileges to update the properties of the specified group.
 void PrivilegesInfoTest.testCanUpdateUserProperties()
          Checks whether the current user has been granted privileges to update the properties of the specified user.
 void CreateGroupTest.testCreateGroup()
           
 void CreateGroupTest.testCreateGroupResponseAsJSON()
          Test for SLING-1677
 void CreateGroupTest.testCreateGroupWithExtraProperties()
           
 void CreateUserTest.testCreateUser()
           
 void CreateUserTest.testCreateUserResponseAsJSON()
          Test for SLING-1677
 void CreateUserTest.testCreateUserWithExtraProperties()
           
 void RemoveAuthorizablesTest.testRemoveAuthorizablesResponseAsJSON()
          Test for SLING-1677
 void UpdateGroupTest.testUpdateGroup()
           
 void UpdateGroupTest.testUpdateGroupMembers()
           
 void UpdateGroupTest.testUpdateGroupResponseAsJSON()
          Test for SLING-1677
 void UpdateUserTest.testUpdateUser()
           
 void UpdateUserTest.testUpdateUserResponseAsJSON()
          Test for SLING-1677
 

Uses of JSONException in org.apache.sling.servlets.get.impl.helpers
 

Methods in org.apache.sling.servlets.get.impl.helpers that throw JSONException
 void ResourceTraversor.check()
          Check if the resource has less child nodes for the specified amount of levels.
protected  void ResourceTraversor.collectResource(Resource resource, int level)
          Adds a resource in the JSON tree.
protected  void JsonResourceWriter.dump(Resource resource, JSONWriter w, int currentRecursionLevel, int maxRecursionLevels)
          Dump given resource in JSON, optionally recursing into its objects
 void JsonResourceWriter.dump(Resource resource, Writer w, int maxRecursionLevels)
          Dump given resource in JSON, optionally recursing into its object
 void JsonResourceWriter.dump(Resource resource, Writer w, int maxRecursionLevels, boolean tidy)
          Dump given resource in JSON, optionally recursing into its objects
 void JsonResourceWriter.dumpProperties(Resource resource, JSONWriter w, List<String> properties)
          Dump only a subset of the resource properties
protected  void JsonResourceWriter.dumpSingleResource(Resource n, JSONWriter w, int currentRecursionLevel, int maxRecursionLevels)
          Dump a single node
 void JsonResourceWriter.dumpValue(JSONWriter w, Object value)
          Dump only a value in the correct format
protected  void JsonResourceWriter.writeProperty(JSONWriter w, ValueMap valueMap, String key, Object value)
          Write a single property
 

Constructors in org.apache.sling.servlets.get.impl.helpers that throw JSONException
ResourceTraversor(int levels, long maxNodes, Resource resource, boolean tidy)
           
 



Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.