Overview

Provides base functionality for JSON types

Attribute Summary

nametypedescription
Public
doIndentBoolean

indicates whether or not indenting should be used when printing or serializing.

indentInteger

Holds the number of spaces for indenting when printing or serializing.

Protected

Inherited Attributes

Function Summary

public serialize(writer: Writer, ) : Void

Convert the JSON Object to JSON format.

protected abstract serialize(writer: Writer, curIndent: Integer, indentAmount: Integer, ) : Void

Convert the JSON Object to JSON format.

public toString() : String

Convert the JSON Object to JSON format.

Inherited Functions

Attributes

public doIndent: Boolean

indicates whether or not indenting should be used when printing or serializing. Default is true

public indent: Integer

Holds the number of spaces for indenting when printing or serializing. doIndent must be true for this to take effect. Default indent is 2.

Functions

public serialize(writer: Writer, ):Void

Parameters
writer
the java.io.Writer that will receive the formated JSON stream.

Convert the JSON Object to JSON format. Output is written to the Writer.

protected abstract serialize(writer: Writer, curIndent: Integer, indentAmount: Integer, ):Void

Parameters
writer
the java.io.Writer that will receive the formated JSON stream
curIndent
the current indent amount
indentAmount
the amount to indent from the curIndent for the next indent level

Convert the JSON Object to JSON format. Output is written to the Writer.

public toString():String

Returns
String
an JSON formatted string

Convert the JSON Object to JSON format.