Class JTokenWriter
Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
Implements
Inherited Members
Namespace: Bayat.Json.Linq
Assembly: Bayat.Json.Runtime.dll
Syntax
public class JTokenWriter : JsonWriter, IDisposable
Constructors
| Improve this Doc View SourceJTokenWriter()
Initializes a new instance of the JToken
Declaration
public JTokenWriter()
JTokenWriter(JContainer)
Initializes a new instance of the JToken
Declaration
public JTokenWriter(JContainer container)
Parameters
| Type | Name | Description |
|---|---|---|
| JContainer | container | The container being written to. |
Properties
| Improve this Doc View SourceCurrentToken
Gets the JToken at the writer's current position.
Declaration
public JToken CurrentToken { get; }
Property Value
| Type | Description |
|---|---|
| JToken |
Token
Gets the token being writen.
Declaration
public JToken Token { get; }
Property Value
| Type | Description |
|---|---|
| JToken | The token being writen. |
Methods
| Improve this Doc View SourceAddValue(JValue, JsonToken)
Declaration
public void AddValue(JValue value, JsonToken token)
Parameters
| Improve this Doc View SourceClose()
Closes this stream and the underlying stream.
Declaration
public override void Close()
Overrides
| Improve this Doc View SourceFlush()
Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream.
Declaration
public override void Flush()
Overrides
| Improve this Doc View SourceWriteComment(String)
Writes out a comment
/.../ containing the specified text.
Declaration
public override void WriteComment(string text)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
text | Text to place inside the comment. |
Overrides
| Improve this Doc View SourceWriteEnd(JsonToken)
Writes the end.
Declaration
protected override void WriteEnd(JsonToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| Json |
token | The token. |
Overrides
| Improve this Doc View SourceWriteNull()
Writes a null value.
Declaration
public override void WriteNull()
Overrides
| Improve this Doc View SourceWritePropertyName(String)
Writes the property name of a name/value pair on a JSON object.
Declaration
public override void WritePropertyName(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
name | The name of the property. |
Overrides
| Improve this Doc View SourceWriteRaw(String)
Writes raw JSON.
Declaration
public override void WriteRaw(string json)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
json | The raw JSON to write. |
Overrides
| Improve this Doc View SourceWriteStartArray()
Writes the beginning of a JSON array.
Declaration
public override void WriteStartArray()
Overrides
| Improve this Doc View SourceWriteStartConstructor(String)
Writes the start of a constructor with the given name.
Declaration
public override void WriteStartConstructor(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
name | The name of the constructor. |
Overrides
| Improve this Doc View SourceWriteStartObject()
Writes the beginning of a JSON object.
Declaration
public override void WriteStartObject()
Overrides
| Improve this Doc View SourceWriteToken(JsonReader, Boolean, Boolean, Boolean)
Declaration
public override void WriteToken(JsonReader reader, bool writeChildren, bool writeDateConstructorAsDate, bool writeComments)
Parameters
| Type | Name | Description |
|---|---|---|
| Json |
reader | |
| System. |
writeChildren | |
| System. |
writeDateConstructorAsDate | |
| System. |
writeComments |
Overrides
| Improve this Doc View SourceWriteUndefined()
Writes an undefined value.
Declaration
public override void WriteUndefined()
Overrides
| Improve this Doc View SourceWriteValue(Boolean)
Writes a System.
Declaration
public override void WriteValue(bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
value | The System. |
Overrides
| Improve this Doc View SourceWriteValue(Byte)
Writes a System.
Declaration
public override void WriteValue(byte value)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
value | The System. |
Overrides
| Improve this Doc View SourceWriteValue(Byte[])
Writes a System.
Declaration
public override void WriteValue(byte[] value)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
value | The System. |
Overrides
| Improve this Doc View SourceWriteValue(Char)
Writes a System.
Declaration
public override void WriteValue(char value)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
value | The System. |
Overrides
| Improve this Doc View SourceWriteValue(DateTime)
Writes a System.
Declaration
public override void WriteValue(DateTime value)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
value | The System. |
Overrides
| Improve this Doc View SourceWriteValue(DateTimeOffset)
Writes a System.
Declaration
public override void WriteValue(DateTimeOffset value)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
value | The System. |
Overrides
| Improve this Doc View SourceWriteValue(Decimal)
Writes a System.
Declaration
public override void WriteValue(decimal value)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
value | The System. |
Overrides
| Improve this Doc View SourceWriteValue(Double)
Writes a System.
Declaration
public override void WriteValue(double value)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
value | The System. |
Overrides
| Improve this Doc View SourceWriteValue(Guid)
Writes a System.
Declaration
public override void WriteValue(Guid value)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
value | The System. |
Overrides
| Improve this Doc View SourceWriteValue(Int16)
Writes a System.
Declaration
public override void WriteValue(short value)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
value | The System. |
Overrides
| Improve this Doc View SourceWriteValue(Int32)
Writes a System.
Declaration
public override void WriteValue(int value)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
value | The System. |
Overrides
| Improve this Doc View SourceWriteValue(Int64)
Writes a System.
Declaration
public override void WriteValue(long value)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
value | The System. |
Overrides
| Improve this Doc View SourceWriteValue(Object)
Writes a System.
Declaration
public override void WriteValue(object value)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
value | The System. |
Overrides
| Improve this Doc View SourceWriteValue(SByte)
Writes a System.
Declaration
public override void WriteValue(sbyte value)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
value | The System. |
Overrides
| Improve this Doc View SourceWriteValue(Single)
Writes a System.
Declaration
public override void WriteValue(float value)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
value | The System. |
Overrides
| Improve this Doc View SourceWriteValue(String)
Writes a System.
Declaration
public override void WriteValue(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
value | The System. |
Overrides
| Improve this Doc View SourceWriteValue(TimeSpan)
Writes a System.
Declaration
public override void WriteValue(TimeSpan value)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
value | The System. |
Overrides
| Improve this Doc View SourceWriteValue(UInt16)
Writes a System.
Declaration
public override void WriteValue(ushort value)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
value | The System. |
Overrides
| Improve this Doc View SourceWriteValue(UInt32)
Writes a System.
Declaration
public override void WriteValue(uint value)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
value | The System. |
Overrides
| Improve this Doc View SourceWriteValue(UInt64)
Writes a System.
Declaration
public override void WriteValue(ulong value)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
value | The System. |
Overrides
| Improve this Doc View SourceWriteValue(Uri)
Writes a System.
Declaration
public override void WriteValue(Uri value)
Parameters
| Type | Name | Description |
|---|---|---|
| System. |
value | The System. |