org.pfsw.bif.text
Interface IJSONConvertible


public interface IJSONConvertible

Implementers of this interface are capable of converting themselves into a valid JSON string representation.

For details about JSON see JSON Web Site


Field Summary
static java.lang.String JSON_ARRAY_END
           
static java.lang.String JSON_ARRAY_START
           
static java.lang.String JSON_ELEMENT_SEPARATOR
           
static java.lang.String JSON_LITERAL_FALSE
           
static java.lang.String JSON_LITERAL_NULL
           
static java.lang.String JSON_LITERAL_TRUE
           
static java.lang.String JSON_OBJECT_END
           
static java.lang.String JSON_OBJECT_START
           
static java.lang.String JSON_PAIR_SEPARATOR
           
static java.lang.String JSON_STRING_DELIMITER
           
static java.lang.String JSON_STRING_ESCAPE
           
 
Method Summary
 void appendAsJSONString(java.lang.Appendable output)
          The receiver of this method must append its internal state as JSON string representation to the given buffer.
 java.lang.String toJSON()
          The receiver of this method returns its internal state as JSON string representation.
 

Field Detail

JSON_OBJECT_START

static final java.lang.String JSON_OBJECT_START

JSON_OBJECT_END

static final java.lang.String JSON_OBJECT_END

JSON_ARRAY_START

static final java.lang.String JSON_ARRAY_START

JSON_ARRAY_END

static final java.lang.String JSON_ARRAY_END

JSON_ELEMENT_SEPARATOR

static final java.lang.String JSON_ELEMENT_SEPARATOR

JSON_PAIR_SEPARATOR

static final java.lang.String JSON_PAIR_SEPARATOR

JSON_STRING_DELIMITER

static final java.lang.String JSON_STRING_DELIMITER

JSON_LITERAL_NULL

static final java.lang.String JSON_LITERAL_NULL

JSON_LITERAL_TRUE

static final java.lang.String JSON_LITERAL_TRUE

JSON_LITERAL_FALSE

static final java.lang.String JSON_LITERAL_FALSE

JSON_STRING_ESCAPE

static final java.lang.String JSON_STRING_ESCAPE
Method Detail

appendAsJSONString

void appendAsJSONString(java.lang.Appendable output)
The receiver of this method must append its internal state as JSON string representation to the given buffer.

Parameters:
output - The output target to which to append the JSON string (must not be null).

toJSON

java.lang.String toJSON()
The receiver of this method returns its internal state as JSON string representation.