C# Class Newtonsoft.Json.JsonTextWriter

Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
Inheritance: JsonWriter
Afficher le fichier Open project: JamesNK/Newtonsoft.Json Class Usage Examples

Private Properties

Свойство Type Description
EnsureWriteBuffer void
OnStringEscapeHandlingChanged void
UpdateCharEscapeFlags void
WriteEscapedString void
WriteIntegerValue void
WriteIntegerValue void
WriteValue void
WriteValue void
WriteValue void
WriteValue void
WriteValueInternal void

Méthodes publiques

Méthode Description
Close ( ) : void

Closes this stream and the underlying stream.

Flush ( ) : void

Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream.

JsonTextWriter ( TextWriter textWriter ) : System

Initializes a new instance of the JsonTextWriter class using the specified TextWriter.

WriteComment ( string text ) : void

Writes a comment /*...*/ containing the specified text.

WriteNull ( ) : void

Writes a null value.

WritePropertyName ( string name ) : void

Writes the property name of a name/value pair on a JSON object.

WritePropertyName ( string name, bool escape ) : void

Writes the property name of a name/value pair on a JSON object.

WriteRaw ( string json ) : void

Writes raw JSON.

WriteStartArray ( ) : void

Writes the beginning of a JSON array.

WriteStartConstructor ( string name ) : void

Writes the start of a constructor with the given name.

WriteStartObject ( ) : void

Writes the beginning of a JSON object.

WriteUndefined ( ) : void

Writes an undefined value.

WriteValue ( System.DateTime value ) : void

Writes a DateTime value.

WriteValue ( DateTimeOffset value ) : void

Writes a DateTimeOffset value.

WriteValue ( System.Guid value ) : void

Writes a Guid value.

WriteValue ( System.TimeSpan value ) : void

Writes a TimeSpan value.

WriteValue ( Uri value ) : void

Writes a Uri value.

WriteValue ( bool value ) : void

Writes a Boolean value.

WriteValue ( byte value ) : void

Writes a Byte value.

WriteValue ( char value ) : void

Writes a Char value.

WriteValue ( decimal value ) : void

Writes a Decimal value.

WriteValue ( double value ) : void

Writes a Double value.

WriteValue ( float value ) : void

Writes a Single value.

WriteValue ( int value ) : void

Writes a Int32 value.

WriteValue ( long value ) : void

Writes a Int64 value.

WriteValue ( object value ) : void

Writes a Object value. An error will raised if the value cannot be written as a single JSON token.

WriteValue ( short value ) : void

Writes a Int16 value.

WriteValue ( string value ) : void

Writes a String value.

WriteWhitespace ( string ws ) : void

Writes the given white space.

Méthodes protégées

Méthode Description
WriteEnd ( JsonToken token ) : void

Writes the specified end token.

WriteIndent ( ) : void

Writes indent characters.

WriteIndentSpace ( ) : void

Writes an indent space.

WriteValueDelimiter ( ) : void

Writes the JSON value delimiter.

Private Methods

Méthode Description
EnsureWriteBuffer ( ) : void
OnStringEscapeHandlingChanged ( ) : void
UpdateCharEscapeFlags ( ) : void
WriteEscapedString ( string value, bool quote ) : void
WriteIntegerValue ( long value ) : void
WriteIntegerValue ( ulong uvalue ) : void
WriteValue ( sbyte value ) : void
WriteValue ( uint value ) : void
WriteValue ( ulong value ) : void
WriteValue ( ushort value ) : void
WriteValueInternal ( string value, JsonToken token ) : void

Method Details

Close() public méthode

Closes this stream and the underlying stream.
public Close ( ) : void
Résultat void

Flush() public méthode

Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream.
public Flush ( ) : void
Résultat void

JsonTextWriter() public méthode

Initializes a new instance of the JsonTextWriter class using the specified TextWriter.
public JsonTextWriter ( TextWriter textWriter ) : System
textWriter System.IO.TextWriter The to write to.
Résultat System

WriteComment() public méthode

Writes a comment /*...*/ containing the specified text.
public WriteComment ( string text ) : void
text string Text to place inside the comment.
Résultat void

WriteEnd() protected méthode

Writes the specified end token.
protected WriteEnd ( JsonToken token ) : void
token JsonToken The end token to write.
Résultat void

WriteIndent() protected méthode

Writes indent characters.
protected WriteIndent ( ) : void
Résultat void

WriteIndentSpace() protected méthode

Writes an indent space.
protected WriteIndentSpace ( ) : void
Résultat void

WriteNull() public méthode

Writes a null value.
public WriteNull ( ) : void
Résultat void

WritePropertyName() public méthode

Writes the property name of a name/value pair on a JSON object.
public WritePropertyName ( string name ) : void
name string The name of the property.
Résultat void

WritePropertyName() public méthode

Writes the property name of a name/value pair on a JSON object.
public WritePropertyName ( string name, bool escape ) : void
name string The name of the property.
escape bool A flag to indicate whether the text should be escaped when it is written as a JSON property name.
Résultat void

WriteRaw() public méthode

Writes raw JSON.
public WriteRaw ( string json ) : void
json string The raw JSON to write.
Résultat void

WriteStartArray() public méthode

Writes the beginning of a JSON array.
public WriteStartArray ( ) : void
Résultat void

WriteStartConstructor() public méthode

Writes the start of a constructor with the given name.
public WriteStartConstructor ( string name ) : void
name string The name of the constructor.
Résultat void

WriteStartObject() public méthode

Writes the beginning of a JSON object.
public WriteStartObject ( ) : void
Résultat void

WriteUndefined() public méthode

Writes an undefined value.
public WriteUndefined ( ) : void
Résultat void

WriteValue() public méthode

Writes a DateTime value.
public WriteValue ( System.DateTime value ) : void
value System.DateTime The value to write.
Résultat void

WriteValue() public méthode

Writes a DateTimeOffset value.
public WriteValue ( DateTimeOffset value ) : void
value DateTimeOffset The value to write.
Résultat void

WriteValue() public méthode

Writes a Guid value.
public WriteValue ( System.Guid value ) : void
value System.Guid The value to write.
Résultat void

WriteValue() public méthode

Writes a TimeSpan value.
public WriteValue ( System.TimeSpan value ) : void
value System.TimeSpan The value to write.
Résultat void

WriteValue() public méthode

Writes a Uri value.
public WriteValue ( Uri value ) : void
value System.Uri The value to write.
Résultat void

WriteValue() public méthode

Writes a Boolean value.
public WriteValue ( bool value ) : void
value bool The value to write.
Résultat void

WriteValue() public méthode

Writes a Byte value.
public WriteValue ( byte value ) : void
value byte The value to write.
Résultat void

WriteValue() public méthode

Writes a Char value.
public WriteValue ( char value ) : void
value char The value to write.
Résultat void

WriteValue() public méthode

Writes a Decimal value.
public WriteValue ( decimal value ) : void
value decimal The value to write.
Résultat void

WriteValue() public méthode

Writes a Double value.
public WriteValue ( double value ) : void
value double The value to write.
Résultat void

WriteValue() public méthode

Writes a Single value.
public WriteValue ( float value ) : void
value float The value to write.
Résultat void

WriteValue() public méthode

Writes a Int32 value.
public WriteValue ( int value ) : void
value int The value to write.
Résultat void

WriteValue() public méthode

Writes a Int64 value.
public WriteValue ( long value ) : void
value long The value to write.
Résultat void

WriteValue() public méthode

Writes a Object value. An error will raised if the value cannot be written as a single JSON token.
public WriteValue ( object value ) : void
value object The value to write.
Résultat void

WriteValue() public méthode

Writes a Int16 value.
public WriteValue ( short value ) : void
value short The value to write.
Résultat void

WriteValue() public méthode

Writes a String value.
public WriteValue ( string value ) : void
value string The value to write.
Résultat void

WriteValueDelimiter() protected méthode

Writes the JSON value delimiter.
protected WriteValueDelimiter ( ) : void
Résultat void

WriteWhitespace() public méthode

Writes the given white space.
public WriteWhitespace ( string ws ) : void
ws string The string of white space characters.
Résultat void