C# Class NetServ.Net.Json.JsonWriter

Provided support for writing JavaScript Object Notation data types to an underlying System.IO.TextWriter.
Inheritance: Disposable, IJsonWriter
Afficher le fichier Open project: appcelerator/entourage Class Usage Examples

Méthodes publiques

Méthode Description
Close ( ) : void

Closes this writer.

JsonWriter ( ) : System

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

JsonWriter ( TextWriter writer, bool ownsWriter ) : System

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

ToString ( ) : string

Returns a System.String representation of this instance.

WriteBeginArray ( ) : void

Writes the start of an array to the underlying data stream.

WriteBeginObject ( ) : void

Writes the start of an object to the underlying data stream.

WriteEndArray ( ) : void

Writes the end of an array to the underlying data stream.

WriteEndObject ( ) : void

Writes the end of an object to the underlying data stream.

WriteName ( string value ) : void

Writes a object property name to the underlying data stream.

WriteValue ( string value ) : void

Writes a raw string value to the underlying data stream.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Disposed of this instance.

PostWrite ( JsonTokenType token ) : void

Performs any post write operations needed after the specified token has been written to the underlying stream.

PreWrite ( JsonTokenType token ) : void

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

Private Methods

Méthode Description
Assert ( bool cond, JsonTokenType nextToken ) : void
IsStructEnd ( JsonTokenType token ) : bool
IsStructStart ( JsonTokenType token ) : bool

Method Details

Close() public méthode

Closes this writer.
public Close ( ) : void
Résultat void

Dispose() protected méthode

Disposed of this instance.
protected Dispose ( bool disposing ) : void
disposing bool True if being called explicitly, otherwise; false /// to indicate being called implicitly by the GC.
Résultat void

JsonWriter() public méthode

Initialises a new instance of then JsonWriter class using a System.IO.StringWriter as the underlying System.IO.TextWriter.
public JsonWriter ( ) : System
Résultat System

JsonWriter() public méthode

Initialises a new instance of the JsonWriter class and specifies the underlying System.IO.TextWriter and a value indicating if the instance owns the specified TextWriter.
public JsonWriter ( 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.
Résultat System

PostWrite() protected méthode

Performs any post write operations needed after the specified token has been written to the underlying stream.
protected PostWrite ( JsonTokenType token ) : void
token JsonTokenType The token written.
Résultat void

PreWrite() protected méthode

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.
Résultat void

ToString() public méthode

Returns a System.String representation of this instance.
public ToString ( ) : string
Résultat string

WriteBeginArray() public méthode

Writes the start of an array to the underlying data stream.
public WriteBeginArray ( ) : void
Résultat void

WriteBeginObject() public méthode

Writes the start of an object to the underlying data stream.
public WriteBeginObject ( ) : void
Résultat void

WriteEndArray() public méthode

Writes the end of an array to the underlying data stream.
public WriteEndArray ( ) : void
Résultat void

WriteEndObject() public méthode

Writes the end of an object to the underlying data stream.
public WriteEndObject ( ) : void
Résultat void

WriteName() public méthode

Writes a object property name to the underlying data stream.
public WriteName ( string value ) : void
value string The property name.
Résultat void

WriteValue() public méthode

Writes a raw string value to the underlying data stream.
public WriteValue ( string value ) : void
value string The string to write.
Résultat void