C# Class numl.Serialization.JsonWriter

JSON Writer object.
Inheritance: IDisposable
显示文件 Open project: sethjuarez/numl Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

Disposes the current JSON writer object.

JsonWriter ( TextWriter writer ) : System

Creates a new JsonWriter from the underlying stream.

Write ( object value ) : void

Writes a raw simple object to the underlying stream.

WriteArray ( IEnumerable c ) : void

Writes an array to the underlying stream.

WriteArrayProperty ( string name, IEnumerable val ) : void

Writes an array property to the underlying stream.

WriteBeginArray ( ) : void

Writes the opening array tag to the underlying stream.

WriteBool ( bool value ) : void

Writes a boolean value to the underlying stream.

WriteEndArray ( ) : void

Writes the closing array tag to the underlying stream.

WriteEndObject ( ) : void

Writes an object closing to the underlying stream.

WriteFirstArrayProperty ( string name, IEnumerable val ) : void

Writes the first array property to the underlying stream.

WriteMatrix ( Matrix matrix ) : void

Writes a Matrix object to the underlying stream.

WriteNull ( ) : void

Writes a null value tag to the underlying stream.

WriteObject ( object o ) : void

Writes a raw complex object to the underlying stream.

WriteProperty ( string name, object val ) : void

Writes a non-first property to the underlying stream.

WriteStartObject ( ) : void

Writes an object opening tag to the underlying stream.

WriteString ( string value ) : void

Writes a string value to the underlying stream.

WriteVector ( Vector v ) : void

Writes a Vector object to the underlying stream.

Private Methods

Method Description
WriteFirstProperty ( string name, object val ) : void

Writes the first property to the underlying stream.

WriteSimpleType ( object value ) : void

Writes a simple type to the underlying stream (see TypeHelpers.IsSimpleType(Type, Type[]))

WriteToken ( int token ) : void
determineWriteAction ( object value, Type type ) : System.Action

Method Details

Dispose() public method

Disposes the current JSON writer object.
public Dispose ( ) : void
return void

JsonWriter() public method

Creates a new JsonWriter from the underlying stream.
public JsonWriter ( TextWriter writer ) : System
writer System.IO.TextWriter
return System

Write() public method

Writes a raw simple object to the underlying stream.
public Write ( object value ) : void
value object
return void

WriteArray() public method

Writes an array to the underlying stream.
public WriteArray ( IEnumerable c ) : void
c IEnumerable
return void

WriteArrayProperty() public method

Writes an array property to the underlying stream.
public WriteArrayProperty ( string name, IEnumerable val ) : void
name string Property name to use when writing.
val IEnumerable Value to write.
return void

WriteBeginArray() public method

Writes the opening array tag to the underlying stream.
public WriteBeginArray ( ) : void
return void

WriteBool() public method

Writes a boolean value to the underlying stream.
public WriteBool ( bool value ) : void
value bool
return void

WriteEndArray() public method

Writes the closing array tag to the underlying stream.
public WriteEndArray ( ) : void
return void

WriteEndObject() public method

Writes an object closing to the underlying stream.
public WriteEndObject ( ) : void
return void

WriteFirstArrayProperty() public method

Writes the first array property to the underlying stream.
public WriteFirstArrayProperty ( string name, IEnumerable val ) : void
name string Property name to use when writing.
val IEnumerable Value to write.
return void

WriteMatrix() public method

Writes a Matrix object to the underlying stream.
public WriteMatrix ( Matrix matrix ) : void
matrix Matrix
return void

WriteNull() public method

Writes a null value tag to the underlying stream.
public WriteNull ( ) : void
return void

WriteObject() public method

Writes a raw complex object to the underlying stream.
public WriteObject ( object o ) : void
o object
return void

WriteProperty() public method

Writes a non-first property to the underlying stream.
public WriteProperty ( string name, object val ) : void
name string Property name to use when writing.
val object Value to write.
return void

WriteStartObject() public method

Writes an object opening tag to the underlying stream.
public WriteStartObject ( ) : void
return void

WriteString() public method

Writes a string value to the underlying stream.
public WriteString ( string value ) : void
value string
return void

WriteVector() public method

Writes a Vector object to the underlying stream.
public WriteVector ( Vector v ) : void
v numl.Math.LinearAlgebra.Vector
return void