Class JSONUtil.JSONBuilder
- java.lang.Object
- 
- de.uplanet.lucy.server.auxiliaries.JSONUtil.JSONBuilder
 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidwriteJSON(Object p_obj)Write an object.voidwriteJSONColon()Write a colon:.JSONUtil.JSONBuilderwriteJSONColonR()Write a colon:.voidwriteJSONComma()Write a comma,.JSONUtil.JSONBuilderwriteJSONCommaR()Write a comma,.voidwriteJSONEndArray()Write a closing square bracket].JSONUtil.JSONBuilderwriteJSONEndArrayR()Write a closing square bracket].voidwriteJSONEndObject()Write a closing curly bracket}.JSONUtil.JSONBuilderwriteJSONEndObjectR()Write a closing curly bracket}.voidwriteJSONEscape(CharSequence p_chseq)Write a JSON-escaped character sequence.voidwriteJSONEscape(CharSequence p_chseq, int p_iStart, int p_iEnd)Write a JSON-escaped character subsequence.JSONUtil.JSONBuilderwriteJSONEscapeR(CharSequence p_chseq)Write a JSON-escaped character sequence.JSONUtil.JSONBuilderwriteJSONEscapeR(CharSequence p_chseq, int p_iStart, int p_iEnd)Write a JSON-escaped character subsequence.voidwriteJSONNamedObject(Object p_obj, String p_strName, Collection<? extends CharSequence> p_properties)Write a JSON named object the given object's bean properties.JSONUtil.JSONBuilderwriteJSONNamedObjectR(Object p_obj, String p_strName, Collection<? extends CharSequence> p_properties)Write a JSON named object the given object's bean properties.voidwriteJSONObject(Object p_obj, List<CharSequence> p_properties)Write a JSON object with the given object's bean properties.JSONUtil.JSONBuilderwriteJSONObjectR(Object p_obj, Collection<? extends CharSequence> p_properties)Write a JSON named object the given object's bean properties.voidwriteJSONPair(String p_strName, Object p_value)Write a name-value pair, e.g.JSONUtil.JSONBuilderwriteJSONPairR(String p_strName, Object p_value)Write a name-value pair, e.g.voidwriteJSONPairs(Object p_obj, List<? extends CharSequence> p_properties)Write name-value pairs ("name":"value",...) representing the given object's bean properties.voidwriteJSONPairs(Map<String,? extends Object> p_map)Write the name-value pairs ("name":"value",...) of the given map.JSONUtil.JSONBuilderwriteJSONPairsR(Object p_obj, List<? extends CharSequence> p_properties)Write name-value pairs ("name":"value",...) representing the given object's bean properties.JSONUtil.JSONBuilderwriteJSONPairsR(Map<String,? extends Object> p_map)Write the name-value pairs ("name":"value",...) of the given map.voidwriteJSONQuote()Write a double quotation mark".JSONUtil.JSONBuilderwriteJSONQuoteR()Write a double quotation mark".JSONUtil.JSONBuilderwriteJSONR(Object p_obj)Write an object.voidwriteJSONStartArray()Write an opening square bracket[.JSONUtil.JSONBuilderwriteJSONStartArrayR()Write an opening square bracket[.voidwriteJSONStartObject()Write an opening curly bracket{.JSONUtil.JSONBuilderwriteJSONStartObjectR()Write an opening curly bracket{.
 
- 
- 
- 
Method Detail- 
writeJSONStartObjectpublic void writeJSONStartObject() throws IOExceptionWrite an opening curly bracket{.- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONStartObjectRpublic JSONUtil.JSONBuilder writeJSONStartObjectR() throws IOException Write an opening curly bracket{.- Returns:
- This object.
- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONEndObjectpublic void writeJSONEndObject() throws IOExceptionWrite a closing curly bracket}.- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONEndObjectRpublic JSONUtil.JSONBuilder writeJSONEndObjectR() throws IOException Write a closing curly bracket}.- Returns:
- This object.
- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONStartArraypublic void writeJSONStartArray() throws IOExceptionWrite an opening square bracket[.- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONStartArrayRpublic JSONUtil.JSONBuilder writeJSONStartArrayR() throws IOException Write an opening square bracket[.- Returns:
- This object.
- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONEndArraypublic void writeJSONEndArray() throws IOExceptionWrite a closing square bracket].- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONEndArrayRpublic JSONUtil.JSONBuilder writeJSONEndArrayR() throws IOException Write a closing square bracket].- Returns:
- This object.
- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONQuotepublic void writeJSONQuote() throws IOExceptionWrite a double quotation mark".- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONQuoteRpublic JSONUtil.JSONBuilder writeJSONQuoteR() throws IOException Write a double quotation mark".- Returns:
- This object.
- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONCommapublic void writeJSONComma() throws IOExceptionWrite a comma,.- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONCommaRpublic JSONUtil.JSONBuilder writeJSONCommaR() throws IOException Write a comma,.- Returns:
- This object.
- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONColonpublic void writeJSONColon() throws IOExceptionWrite a colon:.- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONColonRpublic JSONUtil.JSONBuilder writeJSONColonR() throws IOException Write a colon:.- Returns:
- This object.
- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONpublic void writeJSON(Object p_obj) throws IOException Write an object. The method mimics theJSON.stringifyfunction as defined in the ECMAScript Language Scecification, 5.1 edition.- Parameters:
- p_obj- The object to be written.
- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONRpublic JSONUtil.JSONBuilder writeJSONR(Object p_obj) throws IOException Write an object. The method mimics theJSON.stringifyfunction as defined in the ECMAScript Language Scecification, 5.1 edition.- Parameters:
- p_obj- The object to be written.
- Returns:
- This object.
- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONPairpublic void writeJSONPair(String p_strName, Object p_value) throws IOException Write a name-value pair, e.g."name":"value".- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONPairRpublic JSONUtil.JSONBuilder writeJSONPairR(String p_strName, Object p_value) throws IOException Write a name-value pair, e.g."name":"value".- Returns:
- This object.
- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONPairspublic void writeJSONPairs(Map<String,? extends Object> p_map) throws IOException Write the name-value pairs ("name":"value",...) of the given map.- Parameters:
- p_map- A map containing the pairs.
- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONPairsRpublic JSONUtil.JSONBuilder writeJSONPairsR(Map<String,? extends Object> p_map) throws IOException Write the name-value pairs ("name":"value",...) of the given map.- Parameters:
- p_map- A map containing the pairs.
- Returns:
- This object.
- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONPairspublic void writeJSONPairs(Object p_obj, List<? extends CharSequence> p_properties) throws IOException Write name-value pairs ("name":"value",...) representing the given object's bean properties.- Parameters:
- p_obj- The object.
- p_properties- A list of bean properties that should be written as name-value pairs.
- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONPairsRpublic JSONUtil.JSONBuilder writeJSONPairsR(Object p_obj, List<? extends CharSequence> p_properties) throws IOException Write name-value pairs ("name":"value",...) representing the given object's bean properties.- Parameters:
- p_obj- The object.
- p_properties- A list of bean properties that should be written as name-value pairs.
- Returns:
- This object.
- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONObjectpublic void writeJSONObject(Object p_obj, List<CharSequence> p_properties) throws IOException Write a JSON object with the given object's bean properties.- Parameters:
- p_obj- The object.
- p_properties- A list of bean properties that should be written as name-value pairs.
- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONObjectRpublic JSONUtil.JSONBuilder writeJSONObjectR(Object p_obj, Collection<? extends CharSequence> p_properties) throws IOException Write a JSON named object the given object's bean properties.- Parameters:
- p_obj- The object.
- p_properties- A list of bean properties that should be written as name-value pairs.
- Returns:
- This object.
- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONNamedObjectpublic void writeJSONNamedObject(Object p_obj, String p_strName, Collection<? extends CharSequence> p_properties) throws IOException Write a JSON named object the given object's bean properties.- Parameters:
- p_obj- The object.
- p_strName- The name of the object.
- p_properties- A list of bean properties that should be written as name-value pairs.
- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONNamedObjectRpublic JSONUtil.JSONBuilder writeJSONNamedObjectR(Object p_obj, String p_strName, Collection<? extends CharSequence> p_properties) throws IOException Write a JSON named object the given object's bean properties.- Parameters:
- p_obj- The object.
- p_strName- The name of the object.
- p_properties- A list of bean properties that should be written as name-value pairs.
- Returns:
- This object.
- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONEscapepublic void writeJSONEscape(CharSequence p_chseq) throws IOException Write a JSON-escaped character sequence.- Parameters:
- p_chseq- The character sequence to be written.
- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONEscapeRpublic JSONUtil.JSONBuilder writeJSONEscapeR(CharSequence p_chseq) throws IOException Write a JSON-escaped character sequence.- Parameters:
- p_chseq- The character sequence to be written.
- Returns:
- This object.
- Throws:
- IOException- If an I/O error occurred.
 
 - 
writeJSONEscapepublic void writeJSONEscape(CharSequence p_chseq, int p_iStart, int p_iEnd) throws IOException Write a JSON-escaped character subsequence.- Parameters:
- p_chseq- The character sequence to be written.
- p_iStart- The index of the first character in the subsequence.
- p_iEnd- The index of the character following the last character in the subsequence.
- Throws:
- IOException- If an I/O error occurred.
- IllegalArgumentException- If the given character sequence is- null.
 
 - 
writeJSONEscapeRpublic JSONUtil.JSONBuilder writeJSONEscapeR(CharSequence p_chseq, int p_iStart, int p_iEnd) throws IOException Write a JSON-escaped character subsequence.- Parameters:
- p_chseq- The character sequence to be written.
- p_iStart- The index of the first character in the subsequence.
- p_iEnd- The index of the character following the last character in the subsequence.
- Returns:
- This object.
- Throws:
- IOException- If an I/O error occurred.
- IllegalArgumentException- If the given character sequence is- null.
 
 
- 
 
-