ikrs.json.parser
Interface JSONValueFactory

All Known Implementing Classes:
DefaultJSONValueFactory, JSONRPCValueFactory

public interface JSONValueFactory


Method Summary
 JSONArray createArray()
          This method creates a non-embedded JSON array (first single value from the input).
 JSONArray createArray(int arrayIndex)
          This method creates a JSON array embedded inside a different JSON array.
 JSONArray createArray(java.lang.String memberName)
          This method creates a JSON array embedded inside a different JSON object.
 JSONBoolean createBoolean(java.lang.Boolean bool)
          This method creates a non-embedded JSON boolean (first single value from the input).
 JSONBoolean createBoolean(java.lang.Boolean bool, int arrayIndex)
          This method creates a JSON boolean embedded inside a JSON array.
 JSONBoolean createBoolean(java.lang.Boolean bool, java.lang.String memberName)
          This method creates a JSON boolean embedded inside a JSON object.
 JSONNull createNull()
          This method creates a non-embedded JSON null (first single value from the input).
 JSONNull createNull(int arrayIndex)
          This method creates a JSON null embedded inside a JSON array.
 JSONNull createNull(java.lang.String memberName)
          This method creates a JSON null embedded inside a JSON object.
 JSONNumber createNumber(java.lang.Number number)
          This method creates a non-embedded JSON number (first single value from the input).
 JSONNumber createNumber(java.lang.Number number, int arrayIndex)
          This method creates a JSON number embedded inside a JSON array.
 JSONNumber createNumber(java.lang.Number number, java.lang.String memberName)
          This method creates a JSON number embedded inside a JSON object.
 JSONObject createObject()
          This method creates a non-embedded JSON object (first single value from the input).
 JSONObject createObject(int arraIndex)
          This method creates a JSON object embedded inside a different JSON object.
 JSONObject createObject(java.lang.String memberName)
          This method creates a JSON object embedded inside a different JSON object.
 JSONString createString(java.lang.String str)
          This method creates a non-embedded JSON string (first single value from the input).
 JSONString createString(java.lang.String str, int arrayIndex)
          This method creates a JSON string embedded inside a JSON array.
 JSONString createString(java.lang.String str, java.lang.String memberName)
          This method creates a JSON string embedded inside a JSON object.
 

Method Detail

createNumber

JSONNumber createNumber(java.lang.Number number)
This method creates a non-embedded JSON number (first single value from the input).

Returns:
A single JSON number.

createNumber

JSONNumber createNumber(java.lang.Number number,
                        int arrayIndex)
This method creates a JSON number embedded inside a JSON array. The passed integer is the element's array index.

Parameters:
arrayIndex - The superior array's index where the new element is located.
Returns:
A JSON number inside a different array.

createNumber

JSONNumber createNumber(java.lang.Number number,
                        java.lang.String memberName)
This method creates a JSON number embedded inside a JSON object. The passed string is the element's member name.

Parameters:
memberName - The new number's member name inside the superior object.
Returns:
A JSON number inside a object.

createBoolean

JSONBoolean createBoolean(java.lang.Boolean bool)
This method creates a non-embedded JSON boolean (first single value from the input).

Returns:
A single JSON bolean.

createBoolean

JSONBoolean createBoolean(java.lang.Boolean bool,
                          int arrayIndex)
This method creates a JSON boolean embedded inside a JSON array. The passed integer is the element's array index.

Parameters:
arrayIndex - The superior array's index where the new element is located.
Returns:
A JSON boolean inside an array.

createBoolean

JSONBoolean createBoolean(java.lang.Boolean bool,
                          java.lang.String memberName)
This method creates a JSON boolean embedded inside a JSON object. The passed string is the element's member name.

Parameters:
memberName - The new boolean's member name inside the superior object.
Returns:
A JSON boolean inside a object.

createString

JSONString createString(java.lang.String str)
This method creates a non-embedded JSON string (first single value from the input).

Returns:
A single JSON string.

createString

JSONString createString(java.lang.String str,
                        int arrayIndex)
This method creates a JSON string embedded inside a JSON array. The passed integer is the element's array index.

Parameters:
arrayIndex - The superior array's index where the new element is located.
Returns:
A JSON string inside an array.

createString

JSONString createString(java.lang.String str,
                        java.lang.String memberName)
This method creates a JSON string embedded inside a JSON object. The passed string is the element's member name.

Parameters:
memberName - The new boolean's member name inside the superior object.
Returns:
A JSON string inside a object.

createNull

JSONNull createNull()
This method creates a non-embedded JSON null (first single value from the input).

Returns:
A single JSON null.

createNull

JSONNull createNull(int arrayIndex)
This method creates a JSON null embedded inside a JSON array. The passed integer is the element's array index.

Parameters:
arrayIndex - The superior array's index where the new element is located.
Returns:
A JSON null inside an array.

createNull

JSONNull createNull(java.lang.String memberName)
This method creates a JSON null embedded inside a JSON object. The passed string is the element's member name.

Parameters:
memberName - The new null's member name inside the superior object.
Returns:
A JSON null inside a object.

createArray

JSONArray createArray()
This method creates a non-embedded JSON array (first single value from the input).

Returns:
A single JSON array.

createArray

JSONArray createArray(int arrayIndex)
This method creates a JSON array embedded inside a different JSON array. The passed integer is the element's array index.

Parameters:
arrayIndex - The superior array's index where the new element is located.
Returns:
A JSON array inside a different array.

createArray

JSONArray createArray(java.lang.String memberName)
This method creates a JSON array embedded inside a different JSON object. The passed string is the element's member name.

Parameters:
memberName - The new array's member name inside the superior object.
Returns:
A JSON array inside a object.

createObject

JSONObject createObject()
This method creates a non-embedded JSON object (first single value from the input).

Returns:
A single JSON object.

createObject

JSONObject createObject(int arraIndex)
This method creates a JSON object embedded inside a different JSON object. The passed integer is the element's array index.

Parameters:
arrayIndex - The superior array's index where the new element is located.
Returns:
A JSON object inside an array.

createObject

JSONObject createObject(java.lang.String memberName)
This method creates a JSON object embedded inside a different JSON object. The passed string is the element's member name.

Parameters:
memberName - The new object's member name inside the superior object.
Returns:
A JSON object inside a different object.