Click or drag to resize
Json.NETJsonWriter Class
 
Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
Inheritance Hierarchy

Namespace: Newtonsoft.Json
Assembly: Newtonsoft.Json (in Newtonsoft.Json.dll) Version: 7.0.0.0 (7.0.1.18622)
Syntax
C#
public abstract class JsonWriter : IDisposable

The JsonWriter type exposes the following members.

Constructors
  NameDescription
Protected methodJsonWriter
Creates an instance of the JsonWriter class.
Top
Methods
  NameDescription
Public methodClose
Closes this stream and the underlying stream.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFlush
Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodSetWriteState
Sets the state of the JsonWriter,
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWriteComment
Writes out a comment
1/*...*/
containing the specified text.
Public methodWriteEnd
Writes the end of the current JSON object or array.
Protected methodWriteEnd(JsonToken)
Writes the specified end token.
Public methodWriteEndArray
Writes the end of an array.
Public methodWriteEndConstructor
Writes the end constructor.
Public methodWriteEndObject
Writes the end of a JSON object.
Protected methodWriteIndent
Writes indent characters.
Protected methodWriteIndentSpace
Writes an indent space.
Public methodWriteNull
Writes a null value.
Public methodWritePropertyName(String)
Writes the property name of a name/value pair on a JSON object.
Public methodWritePropertyName(String, Boolean)
Writes the property name of a name/value pair on a JSON object.
Public methodWriteRaw
Writes raw JSON without changing the writer's state.
Public methodWriteRawValue
Writes raw JSON where a value is expected and updates the writer's state.
Public methodWriteStartArray
Writes the beginning of a JSON array.
Public methodWriteStartConstructor
Writes the start of a constructor with the given name.
Public methodWriteStartObject
Writes the beginning of a JSON object.
Public methodWriteToken(JsonReader)
Writes the current JsonReader token and its children.
Public methodWriteToken(JsonToken)
Writes the JsonToken token.
Public methodWriteToken(JsonReader, Boolean)
Writes the current JsonReader token.
Public methodWriteToken(JsonToken, Object)
Writes the JsonToken token and its value.
Public methodWriteUndefined
Writes an undefined value.
Public methodWriteValue(Boolean)
Writes a Boolean value.
Public methodWriteValue(Byte)
Writes a Byte value.
Public methodWriteValue(Byte)
Writes a Byte[] value.
Public methodWriteValue(Char)
Writes a Char value.
Public methodWriteValue(DateTime)
Writes a DateTime value.
Public methodWriteValue(DateTimeOffset)
Writes a DateTimeOffset value.
Public methodWriteValue(Decimal)
Writes a Decimal value.
Public methodWriteValue(Double)
Writes a Double value.
Public methodWriteValue(Guid)
Writes a Guid value.
Public methodWriteValue(Int16)
Writes a Int16 value.
Public methodWriteValue(Int32)
Writes a Int32 value.
Public methodWriteValue(Int64)
Writes a Int64 value.
Public methodWriteValue(NullableBoolean)
Public methodWriteValue(NullableByte)
Public methodWriteValue(NullableChar)
Public methodWriteValue(NullableDateTime)
Public methodWriteValue(NullableDateTimeOffset)
Public methodWriteValue(NullableDecimal)
Public methodWriteValue(NullableDouble)
Public methodWriteValue(NullableGuid)
Public methodWriteValue(NullableInt16)
Public methodWriteValue(NullableInt32)
Public methodWriteValue(NullableInt64)
Public methodWriteValue(NullableSByte)
Public methodWriteValue(NullableSingle)
Public methodWriteValue(NullableTimeSpan)
Public methodWriteValue(NullableUInt16)
Public methodWriteValue(NullableUInt32)
Public methodWriteValue(NullableUInt64)
Public methodWriteValue(Object)
Writes a Object value. An error will raised if the value cannot be written as a single JSON token.
Public methodWriteValue(SByte)
Writes a SByte value.
Public methodWriteValue(Single)
Writes a Single value.
Public methodWriteValue(String)
Writes a String value.
Public methodWriteValue(TimeSpan)
Writes a TimeSpan value.
Public methodWriteValue(UInt16)
Writes a UInt16 value.
Public methodWriteValue(UInt32)
Writes a UInt32 value.
Public methodWriteValue(UInt64)
Writes a UInt64 value.
Public methodWriteValue(Uri)
Writes a Uri value.
Protected methodWriteValueDelimiter
Writes the JSON value delimiter.
Public methodWriteWhitespace
Writes out the given white space.
Top
Properties
  NameDescription
Public propertyCloseOutput
Gets or sets a value indicating whether the underlying stream or TextReader should be closed when the writer is closed.
Public propertyCulture
Gets or sets the culture used when writing JSON. Defaults to InvariantCulture.
Public propertyDateFormatHandling
Get or set how dates are written to JSON text.
Public propertyDateFormatString
Get or set how DateTime and DateTimeOffset values are formatting when writing JSON text.
Public propertyDateTimeZoneHandling
Get or set how DateTime time zones are handling when writing JSON text.
Public propertyFloatFormatHandling
Get or set how special floating point numbers, e.g. NaN, PositiveInfinity and NegativeInfinity, are written to JSON text.
Public propertyFormatting
Indicates how JSON text output is formatted.
Public propertyPath
Gets the path of the writer.
Public propertyStringEscapeHandling
Get or set how strings are escaped when writing JSON text.
Protected propertyTop
Gets the top.
Public propertyWriteState
Gets the state of the writer.
Top
See Also