C# Class NetServ.Net.Json.IndentedJsonWriter

Provided support for writing JavaScript Object Notation data types to an underlying System.IO.TextWriter whilst indenting the output.
Inheritance: JsonWriter
Mostra file Open project: appcelerator/entourage

Public Methods

Method Description
IndentedJsonWriter ( ) : System

Initialises a new instance of then IndentedJsonWriter class using a System.IO.StringWriter as the underlying System.IO.TextWriter.

IndentedJsonWriter ( TextWriter writer, bool ownsWriter ) : System

Initialises a new instance of the IndentedJsonWriter class and specifies the underlying System.IO.TextWriter and a value indicating if the instance owns the specified TextWriter.

Protected Methods

Method Description
PreWrite ( JsonTokenType token ) : void

Performs any assertions and / or write operations needed before the specified token is written to the underlying stream.

WriteIndent ( ) : void

Writes the indent to the underlying stream.

Method Details

IndentedJsonWriter() public method

Initialises a new instance of then IndentedJsonWriter class using a System.IO.StringWriter as the underlying System.IO.TextWriter.
public IndentedJsonWriter ( ) : System
return System

IndentedJsonWriter() public method

Initialises a new instance of the IndentedJsonWriter class and specifies the underlying System.IO.TextWriter and a value indicating if the instance owns the specified TextWriter.
public IndentedJsonWriter ( TextWriter writer, bool ownsWriter ) : System
writer System.IO.TextWriter The underlying text writer.
ownsWriter bool True if this instance owns the specified TextWriter, /// otherwise; false.
return System

PreWrite() protected method

Performs any assertions and / or write operations needed before the specified token is written to the underlying stream.
protected PreWrite ( JsonTokenType token ) : void
token JsonTokenType The next token to be written.
return void

WriteIndent() protected method

Writes the indent to the underlying stream.
protected WriteIndent ( ) : void
return void