• Manual
  • API Documentation
  • Bayat.Json
  • JsonWriter

    Show / Hide Table of Contents
    • Bayat
      • UnityThread
    • Bayat.Core
      • AddReferenceWindow
      • AddReferenceWindow.Dependency
      • AssetReferenceResolver
      • AssetReferenceResolverEditor
      • BayatEditorStyles
      • CoreAssetPostProcessor
      • EditorApplicationUtility
      • MaterialPropertiesResolver
      • MaterialPropertiesResolverEditor
      • ReferenceCheckerWindow
      • ReferenceResolverMode
      • RuntimeMaterialProperties
      • RuntimeMaterialProperty
      • RuntimeMaterialPropertyType
      • SceneReferenceResolver
      • SceneReferenceResolverEditor
      • UnityEditorInternalException
    • Bayat.Core.EditorWindows
      • AssetReferenceManagerWindow
      • AssetReferenceManagerWindow.Styles
      • DatabaseMigrationWindow
      • DatabaseMigrationWindow.SceneMigrationStatus
      • DatabaseMigrationWindow.Styles
      • EditorWindowExtensions
      • EditorWindowUtility
      • EditorWindowWrapper
      • SceneReferenceManagerWindow
      • SceneReferenceManagerWindow.Styles
      • WindowClose
      • WrappedEditorWindow
    • Bayat.Core.Profiling
      • ProfiledSegment
      • ProfiledSegmentCollection
      • ProfilingScope
      • ProfilingUtility
    • Bayat.Core.Reflection
      • AssemblyExtensions
      • Codebase
      • RuntimeCodebase
      • TypeExtensions
      • TypeUtility
    • Bayat.Core.Text
      • StringExtensions
      • StringUtility
    • Bayat.Core.Utilities
      • ExceptionExtensions
      • GuidToReferenceDictionary
      • SerializableDictionary<TKey, TVal>
    • Bayat.Json
      • ConstructorHandling
      • CreateObjectConverterWindow
      • CreateObjectConverterWindow.Styles
      • DateFormatHandling
      • DateParseHandling
      • DateTimeZoneHandling
      • DefaultValueHandling
      • FloatFormatHandling
      • FloatParseHandling
      • Formatting
      • GameObjectSerializationHandler
      • GameObjectSerializationManagerTreeView
      • GameObjectSerializationManagerTreeView.Styles
      • GameObjectSerializationManagerWindow
      • GameObjectSerializationManagerWindow.Styles
      • IArrayPool<T>
      • IJsonLineInfo
      • JsonArrayAttribute
      • JsonConstructorAttribute
      • JsonContainerAttribute
      • JsonContainerType
      • JsonConvert
      • JsonConverter
      • JsonConverterAttribute
      • JsonConverterCollection
      • JsonDefaultSettingsWindow
      • JsonDefaultSettingsWindow.Styles
      • JsonDictionaryAttribute
      • JsonException
      • JsonExtensionDataAttribute
      • JsonIgnoreAttribute
      • JsonObjectAttribute
      • JsonPosition
      • JsonPropertyAttribute
      • JsonReader
      • JsonReader.State
      • JsonReaderException
      • JsonRequiredAttribute
      • JsonSerializationException
      • JsonSerializer
      • JsonSerializerSettings
      • JsonSerializerSettingsPreset
      • JsonTextReader
      • JsonTextWriter
      • JsonToken
      • JsonWriter
      • JsonWriter.State
      • JsonWriterException
      • MemberSerialization
      • MetadataPropertyHandling
      • MissingMemberHandling
      • NullValueHandling
      • ObjectCreationHandling
      • PreserveReferencesHandling
      • ReadType
      • ReferenceLoopHandling
      • Required
      • StringEscapeHandling
      • TypeNameHandling
      • WriteState
    • Bayat.Json.Bson
      • BsonArray
      • BsonBinary
      • BsonBinaryType
      • BsonBinaryWriter
      • BsonObject
      • BsonObjectId
      • BsonProperty
      • BsonReader
      • BsonRegex
      • BsonString
      • BsonToken
      • BsonType
      • BsonValue
      • BsonWriter
    • Bayat.Json.Converters
      • AnimatorConverter
      • AudioClipConverter
      • BinaryConverter
      • BoundsConverter
      • BsonObjectIdConverter
      • ColliderConverter
      • ColorConverter
      • CustomCreationConverter<T>
      • DateTimeConverterBase
      • DiscriminatedUnionConverter
      • EntityKeyMemberConverter
      • ExpandoObjectConverter
      • GameObjectConverter
      • HashSetConverter
      • IsoDateTimeConverter
      • JavaScriptDateTimeConverter
      • KeyValuePairConverter
      • MaterialConverter
      • MaterialConverter.JsonSerializedMaterialProperty
      • Matrix4x4Converter
      • MeshConverter
      • MeshConverter.SerializedIndices
      • MeshFilterConverter
      • ObjectJsonConverter
      • QuaternionConverter
      • RectConverter
      • RectTransformConverter
      • RegexConverter
      • RendererConverter
      • ResolutionConverter
      • ShaderConverter
      • SpriteConverter
      • StringEnumConverter
      • Texture2DConverter
      • TransformConverter
      • UnityBehaviourConverter
      • UnityComponentConverter
      • UnityMonoBehaviourConverter
      • UnityObjectConverter
      • UriConverter
      • VectorConverter
      • VersionConverter
      • XmlNodeConverter
    • Bayat.Json.Linq
      • CommentHandling
      • Extensions
      • IJEnumerable<T>
      • JArray
      • JConstructor
      • JContainer
      • JEnumerable<T>
      • JObject
      • JProperty
      • JPropertyDescriptor
      • JPropertyKeyedCollection
      • JRaw
      • JsonLoadSettings
      • JsonMergeSettings
      • JToken
      • JTokenEqualityComparer
      • JTokenReader
      • JTokenType
      • JTokenWriter
      • JValue
      • LineInfoHandling
      • MergeArrayHandling
      • MergeNullValueHandling
    • Bayat.Json.Linq.JsonPath
      • ArrayIndexFilter
      • ArrayMultipleIndexFilter
      • ArraySliceFilter
      • BooleanQueryExpression
      • CompositeExpression
      • FieldFilter
      • FieldMultipleFilter
      • JPath
      • PathFilter
      • QueryExpression
      • QueryFilter
      • QueryOperator
      • ScanFilter
    • Bayat.Json.Serialization
      • CachedAttributeGetter<T>
      • CamelCasePropertyNamesContractResolver
      • DefaultContractResolver
      • DefaultContractResolver.EnumerableDictionaryWrapper<TEnumeratorKey, TEnumeratorValue>
      • DefaultContractResolverState
      • DefaultReferenceResolver
      • DefaultSerializationBinder
      • DefaultSerializationBinder.TypeNameKey
      • DiagnosticsTraceWriter
      • ErrorContext
      • ErrorEventArgs
      • ExpressionValueProvider
      • ExtensionDataGetter
      • ExtensionDataSetter
      • IAttributeProvider
      • IContractResolver
      • IReferenceResolver
      • ITraceWriter
      • IValueProvider
      • JsonArrayContract
      • JsonContainerContract
      • JsonContract
      • JsonContractType
      • JsonDictionaryContract
      • JsonDynamicContract
      • JsonFormatterConverter
      • JsonISerializableContract
      • JsonLinqContract
      • JsonObjectContract
      • JsonPrimitiveContract
      • JsonProperty
      • JsonPropertyCollection
      • JsonSerializerInternalBase
      • JsonSerializerProxy
      • JsonSerializerReader
      • JsonSerializerReader.CreatorPropertyContext
      • JsonSerializerReader.PropertyPresence
      • JsonSerializerWriter
      • JsonStringContract
      • JsonTypeReflector
      • MemoryTraceWriter
      • ObjectConstructor<T>
      • OnErrorAttribute
      • ReflectionAttributeProvider
      • ReflectionValueProvider
      • ResolverContractKey
      • SerializationCallback
      • SerializationErrorCallback
      • TraceJsonReader
      • TraceJsonWriter
    • Bayat.Json.Shims
      • PreserveAttribute
    • Bayat.Json.Utilities
      • Base64Encoder
      • BidirectionalDictionary<TFirst, TSecond>
      • BufferUtils
      • CollectionUtils
      • CollectionWrapper<T>
      • ConvertUtils
      • ConvertUtils.ConvertResult
      • ConvertUtils.TypeConvertKey
      • Creator<T>
      • DateTimeParser
      • DateTimeUtils
      • DictionaryWrapper<TKey, TValue>
      • DynamicProxy<T>
      • DynamicProxyMetaObject<T>
      • DynamicUtils
      • DynamicUtils.BinderWrapper
      • EnumUtils
      • EnumValue<T>
      • ExpressionReflectionDelegateFactory
      • FSharpFunction
      • FSharpUtils
      • ImmutableCollectionsUtils
      • ImmutableCollectionsUtils.ImmutableCollectionTypeInfo
      • IWrappedCollection
      • IWrappedDictionary
      • JavaScriptUtils
      • JsonTokenUtils
      • LateBoundReflectionDelegateFactory
      • MathUtils
      • MethodCall<T, TResult>
      • MiscellaneousUtils
      • NoThrowExpressionVisitor
      • NoThrowGetBinderMember
      • NoThrowSetBinderMember
      • ParseResult
      • ParserTimeZone
      • PrimitiveTypeCode
      • PropertyNameTable
      • ReflectionDelegateFactory
      • ReflectionMember
      • ReflectionObject
      • ReflectionUtils
      • StringBuffer
      • StringReference
      • StringReferenceExtensions
      • StringUtils
      • ThreadSafeStore<TKey, TValue>
      • TypeInformation
      • ValidationUtils
    • Bayat.SaveSystem
      • AutoSave
      • AutoSaveManager
      • AutoSaveManager.LoadEvent
      • AutoSaveManager.SaveEvent
      • AutoSaveManagerWindow
      • AutoSaveManagerWindow.Styles
      • LoadEventArgs
      • LoadIntoEventArgs
      • SaveEventArgs
      • SaveSystemAPI
      • SaveSystemDefaultSettingsWindow
      • SaveSystemDefaultSettingsWindow.Styles
      • SaveSystemEditorResources
      • SaveSystemJsonSerializer
      • SaveSystemManager
      • SaveSystemSettings
      • SaveSystemSettingsPreset
      • WelcomeWindow
      • WelcomeWindow.Styles
    • Bayat.SaveSystem.Security
      • ISaveSystemEncryption
      • SaveSystemCryptoStream
      • SaveSystemSymmetricCryptoStream
      • SaveSystemSymmetricEncryption
    • Bayat.SaveSystem.Storage
      • BuiltInConnectionFactory
      • ConnectionStringFactory
      • FileStorageStream
      • IConnectionFactory
      • IStorage
      • IStorageStream
      • LocalDiskStorage
      • PlayerPrefsStorage
      • PlayerPrefsStorageStream
      • StorageBackup
      • StorageBase
      • StorageClearOperationResult
      • StorageConnectionString
      • StorageCopyOperationResult
      • StorageDeleteOperationResult
      • StorageFactory
      • StorageFullException
      • StorageInvalidIdentifierException
      • StorageItemNotFoundException
      • StorageListOptions
      • StorageMetaData
      • StorageMoveOperationResult
      • StorageOperationResult
      • StorageStream

    Class JsonWriter

    Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.

    Inheritance
    System.Object
    JsonWriter
    BsonWriter
    JsonTextWriter
    JTokenWriter
    TraceJsonWriter
    Implements
    System.IDisposable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Bayat.Json
    Assembly: Bayat.Json.Runtime.dll
    Syntax
    public abstract class JsonWriter : IDisposable

    Constructors

    | Improve this Doc View Source

    JsonWriter()

    Creates an instance of the JsonWriter class.

    Declaration
    protected JsonWriter()

    Fields

    | Improve this Doc View Source

    StateArrayTempate

    Declaration
    public static readonly JsonWriter.State[][] StateArrayTempate
    Field Value
    Type Description
    JsonWriter.State[][]

    Properties

    | Improve this Doc View Source

    CloseOutput

    Gets or sets a value indicating whether the underlying stream or System.IO.TextReader should be closed when the writer is closed.

    Declaration
    public bool CloseOutput { get; set; }
    Property Value
    Type Description
    System.Boolean

    true to close the underlying stream or System.IO.TextReader when the writer is closed; otherwise false. The default is true.

    | Improve this Doc View Source

    ContainerPath

    Declaration
    public string ContainerPath { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    Culture

    Gets or sets the culture used when writing JSON. Defaults to System.Globalization.CultureInfo.InvariantCulture.

    Declaration
    public CultureInfo Culture { get; set; }
    Property Value
    Type Description
    System.Globalization.CultureInfo
    | Improve this Doc View Source

    DateFormatHandling

    Get or set how dates are written to JSON text.

    Declaration
    public DateFormatHandling DateFormatHandling { get; set; }
    Property Value
    Type Description
    DateFormatHandling
    | Improve this Doc View Source

    DateFormatString

    Get or set how System.DateTime and System.DateTimeOffset values are formatting when writing JSON text.

    Declaration
    public string DateFormatString { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    DateTimeZoneHandling

    Get or set how System.DateTime time zones are handling when writing JSON text.

    Declaration
    public DateTimeZoneHandling DateTimeZoneHandling { get; set; }
    Property Value
    Type Description
    DateTimeZoneHandling
    | Improve this Doc View Source

    FloatFormatHandling

    Get or set how special floating point numbers, e.g. System.Double.NaN, System.Double.PositiveInfinity and System.Double.NegativeInfinity, are written to JSON text.

    Declaration
    public FloatFormatHandling FloatFormatHandling { get; set; }
    Property Value
    Type Description
    FloatFormatHandling
    | Improve this Doc View Source

    Formatting

    Indicates how JSON text output is formatted.

    Declaration
    public Formatting Formatting { get; set; }
    Property Value
    Type Description
    Formatting
    | Improve this Doc View Source

    Path

    Gets the path of the writer.

    Declaration
    public string Path { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    StringEscapeHandling

    Get or set how strings are escaped when writing JSON text.

    Declaration
    public StringEscapeHandling StringEscapeHandling { get; set; }
    Property Value
    Type Description
    StringEscapeHandling
    | Improve this Doc View Source

    Top

    Gets the top.

    Declaration
    public int Top { get; }
    Property Value
    Type Description
    System.Int32

    The top.

    | Improve this Doc View Source

    WriteState

    Gets the state of the writer.

    Declaration
    public WriteState WriteState { get; }
    Property Value
    Type Description
    WriteState

    Methods

    | Improve this Doc View Source

    AutoComplete(JsonToken)

    Declaration
    public void AutoComplete(JsonToken tokenBeingWritten)
    Parameters
    Type Name Description
    JsonToken tokenBeingWritten
    | Improve this Doc View Source

    BuildStateArray()

    Declaration
    public static JsonWriter.State[][] BuildStateArray()
    Returns
    Type Description
    JsonWriter.State[][]
    | Improve this Doc View Source

    Close()

    Closes this stream and the underlying stream.

    Declaration
    public virtual void Close()
    | Improve this Doc View Source

    Dispose(Boolean)

    Releases unmanaged and - optionally - managed resources

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    true to release both managed and unmanaged resources; false to release only unmanaged resources.

    | Improve this Doc View Source

    Flush()

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

    Declaration
    public abstract void Flush()
    | Improve this Doc View Source

    InternalWriteComment()

    Declaration
    protected void InternalWriteComment()
    | Improve this Doc View Source

    InternalWriteEnd(JsonContainerType)

    Declaration
    protected void InternalWriteEnd(JsonContainerType container)
    Parameters
    Type Name Description
    JsonContainerType container
    | Improve this Doc View Source

    InternalWritePropertyName(String)

    Declaration
    protected void InternalWritePropertyName(string name)
    Parameters
    Type Name Description
    System.String name
    | Improve this Doc View Source

    InternalWriteRaw()

    Declaration
    protected void InternalWriteRaw()
    | Improve this Doc View Source

    InternalWriteStart(JsonToken, JsonContainerType)

    Declaration
    protected void InternalWriteStart(JsonToken token, JsonContainerType container)
    Parameters
    Type Name Description
    JsonToken token
    JsonContainerType container
    | Improve this Doc View Source

    InternalWriteValue(JsonToken)

    Declaration
    protected void InternalWriteValue(JsonToken token)
    Parameters
    Type Name Description
    JsonToken token
    | Improve this Doc View Source

    InternalWriteWhitespace(String)

    Declaration
    protected void InternalWriteWhitespace(string ws)
    Parameters
    Type Name Description
    System.String ws
    | Improve this Doc View Source

    OnStringEscapeHandlingChanged()

    Declaration
    protected virtual void OnStringEscapeHandlingChanged()
    | Improve this Doc View Source

    SetWriteState(JsonToken, Object)

    Sets the state of the JsonWriter,

    Declaration
    protected void SetWriteState(JsonToken token, object value)
    Parameters
    Type Name Description
    JsonToken token

    The JsonToken being written.

    System.Object value

    The value being written.

    | Improve this Doc View Source

    UpdateScopeWithFinishedValue()

    Declaration
    public void UpdateScopeWithFinishedValue()
    | Improve this Doc View Source

    WriteComment(String)

    Writes out a comment

    /.../
    containing the specified text.

    Declaration
    public virtual void WriteComment(string text)
    Parameters
    Type Name Description
    System.String text

    Text to place inside the comment.

    | Improve this Doc View Source

    WriteEnd()

    Writes the end of the current JSON object or array.

    Declaration
    public virtual void WriteEnd()
    | Improve this Doc View Source

    WriteEnd(JsonToken)

    Writes the specified end token.

    Declaration
    protected virtual void WriteEnd(JsonToken token)
    Parameters
    Type Name Description
    JsonToken token

    The end token to write.

    | Improve this Doc View Source

    WriteEndArray()

    Writes the end of an array.

    Declaration
    public virtual void WriteEndArray()
    | Improve this Doc View Source

    WriteEndConstructor()

    Writes the end constructor.

    Declaration
    public virtual void WriteEndConstructor()
    | Improve this Doc View Source

    WriteEndObject()

    Writes the end of a JSON object.

    Declaration
    public virtual void WriteEndObject()
    | Improve this Doc View Source

    WriteIndent()

    Writes indent characters.

    Declaration
    protected virtual void WriteIndent()
    | Improve this Doc View Source

    WriteIndentSpace()

    Writes an indent space.

    Declaration
    protected virtual void WriteIndentSpace()
    | Improve this Doc View Source

    WriteNull()

    Writes a null value.

    Declaration
    public virtual void WriteNull()
    | Improve this Doc View Source

    WriteProperty(String, Object)

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

    Declaration
    public virtual void WriteProperty(string name, object value)
    Parameters
    Type Name Description
    System.String name

    The name of the property.

    System.Object value

    The value of the property.

    | Improve this Doc View Source

    WritePropertyName(String)

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

    Declaration
    public virtual void WritePropertyName(string name)
    Parameters
    Type Name Description
    System.String name

    The name of the property.

    | Improve this Doc View Source

    WritePropertyName(String, Boolean)

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

    Declaration
    public virtual void WritePropertyName(string name, bool escape)
    Parameters
    Type Name Description
    System.String name

    The name of the property.

    System.Boolean escape

    A flag to indicate whether the text should be escaped when it is written as a JSON property name.

    | Improve this Doc View Source

    WriteRaw(String)

    Writes raw JSON without changing the writer's state.

    Declaration
    public virtual void WriteRaw(string json)
    Parameters
    Type Name Description
    System.String json

    The raw JSON to write.

    | Improve this Doc View Source

    WriteRawValue(String)

    Writes raw JSON where a value is expected and updates the writer's state.

    Declaration
    public virtual void WriteRawValue(string json)
    Parameters
    Type Name Description
    System.String json

    The raw JSON to write.

    | Improve this Doc View Source

    WriteStartArray()

    Writes the beginning of a JSON array.

    Declaration
    public virtual void WriteStartArray()
    | Improve this Doc View Source

    WriteStartConstructor(String)

    Writes the start of a constructor with the given name.

    Declaration
    public virtual void WriteStartConstructor(string name)
    Parameters
    Type Name Description
    System.String name

    The name of the constructor.

    | Improve this Doc View Source

    WriteStartObject()

    Writes the beginning of a JSON object.

    Declaration
    public virtual void WriteStartObject()
    | Improve this Doc View Source

    WriteToken(JsonReader)

    Writes the current JsonReader token and its children.

    Declaration
    public void WriteToken(JsonReader reader)
    Parameters
    Type Name Description
    JsonReader reader

    The JsonReader to read the token from.

    | Improve this Doc View Source

    WriteToken(JsonReader, Boolean)

    Writes the current JsonReader token.

    Declaration
    public void WriteToken(JsonReader reader, bool writeChildren)
    Parameters
    Type Name Description
    JsonReader reader

    The JsonReader to read the token from.

    System.Boolean writeChildren

    A flag indicating whether the current token's children should be written.

    | Improve this Doc View Source

    WriteToken(JsonReader, Boolean, Boolean, Boolean)

    Declaration
    public virtual void WriteToken(JsonReader reader, bool writeChildren, bool writeDateConstructorAsDate, bool writeComments)
    Parameters
    Type Name Description
    JsonReader reader
    System.Boolean writeChildren
    System.Boolean writeDateConstructorAsDate
    System.Boolean writeComments
    | Improve this Doc View Source

    WriteToken(JsonToken)

    Writes the JsonToken token.

    Declaration
    public void WriteToken(JsonToken token)
    Parameters
    Type Name Description
    JsonToken token

    The JsonToken to write.

    | Improve this Doc View Source

    WriteToken(JsonToken, Object)

    Writes the JsonToken token and its value.

    Declaration
    public void WriteToken(JsonToken token, object value)
    Parameters
    Type Name Description
    JsonToken token

    The JsonToken to write.

    System.Object value

    The value to write. A value is only required for tokens that have an associated value, e.g. the System.String property name for PropertyName. A null value can be passed to the method for token's that don't have a value, e.g. StartObject.

    | Improve this Doc View Source

    WriteUndefined()

    Writes an undefined value.

    Declaration
    public virtual void WriteUndefined()
    | Improve this Doc View Source

    WriteValue(JsonWriter, PrimitiveTypeCode, Object)

    Declaration
    public static void WriteValue(JsonWriter writer, PrimitiveTypeCode typeCode, object value)
    Parameters
    Type Name Description
    JsonWriter writer
    PrimitiveTypeCode typeCode
    System.Object value
    | Improve this Doc View Source

    WriteValue(Boolean)

    Writes a System.Boolean value.

    Declaration
    public virtual void WriteValue(bool value)
    Parameters
    Type Name Description
    System.Boolean value

    The System.Boolean value to write.

    | Improve this Doc View Source

    WriteValue(Byte)

    Writes a System.Byte value.

    Declaration
    public virtual void WriteValue(byte value)
    Parameters
    Type Name Description
    System.Byte value

    The System.Byte value to write.

    | Improve this Doc View Source

    WriteValue(Byte[])

    Writes a System.Byte[] value.

    Declaration
    public virtual void WriteValue(byte[] value)
    Parameters
    Type Name Description
    System.Byte[] value

    The System.Byte[] value to write.

    | Improve this Doc View Source

    WriteValue(Char)

    Writes a System.Char value.

    Declaration
    public virtual void WriteValue(char value)
    Parameters
    Type Name Description
    System.Char value

    The System.Char value to write.

    | Improve this Doc View Source

    WriteValue(DateTime)

    Writes a System.DateTime value.

    Declaration
    public virtual void WriteValue(DateTime value)
    Parameters
    Type Name Description
    System.DateTime value

    The System.DateTime value to write.

    | Improve this Doc View Source

    WriteValue(DateTimeOffset)

    Writes a System.DateTimeOffset value.

    Declaration
    public virtual void WriteValue(DateTimeOffset value)
    Parameters
    Type Name Description
    System.DateTimeOffset value

    The System.DateTimeOffset value to write.

    | Improve this Doc View Source

    WriteValue(Decimal)

    Writes a System.Decimal value.

    Declaration
    public virtual void WriteValue(decimal value)
    Parameters
    Type Name Description
    System.Decimal value

    The System.Decimal value to write.

    | Improve this Doc View Source

    WriteValue(Double)

    Writes a System.Double value.

    Declaration
    public virtual void WriteValue(double value)
    Parameters
    Type Name Description
    System.Double value

    The System.Double value to write.

    | Improve this Doc View Source

    WriteValue(Guid)

    Writes a System.Guid value.

    Declaration
    public virtual void WriteValue(Guid value)
    Parameters
    Type Name Description
    System.Guid value

    The System.Guid value to write.

    | Improve this Doc View Source

    WriteValue(Int16)

    Writes a System.Int16 value.

    Declaration
    public virtual void WriteValue(short value)
    Parameters
    Type Name Description
    System.Int16 value

    The System.Int16 value to write.

    | Improve this Doc View Source

    WriteValue(Int32)

    Writes a System.Int32 value.

    Declaration
    public virtual void WriteValue(int value)
    Parameters
    Type Name Description
    System.Int32 value

    The System.Int32 value to write.

    | Improve this Doc View Source

    WriteValue(Int64)

    Writes a System.Int64 value.

    Declaration
    public virtual void WriteValue(long value)
    Parameters
    Type Name Description
    System.Int64 value

    The System.Int64 value to write.

    | Improve this Doc View Source

    WriteValue(Nullable<Boolean>)

    Writes a System.Nullable<T> value.

    Declaration
    public virtual void WriteValue(bool? value)
    Parameters
    Type Name Description
    System.Nullable<System.Boolean> value

    The System.Nullable<T> value to write.

    | Improve this Doc View Source

    WriteValue(Nullable<Byte>)

    Writes a System.Nullable<T> value.

    Declaration
    public virtual void WriteValue(byte? value)
    Parameters
    Type Name Description
    System.Nullable<System.Byte> value

    The System.Nullable<T> value to write.

    | Improve this Doc View Source

    WriteValue(Nullable<Char>)

    Writes a System.Nullable<T> value.

    Declaration
    public virtual void WriteValue(char? value)
    Parameters
    Type Name Description
    System.Nullable<System.Char> value

    The System.Nullable<T> value to write.

    | Improve this Doc View Source

    WriteValue(Nullable<DateTime>)

    Writes a System.Nullable<T> value.

    Declaration
    public virtual void WriteValue(DateTime? value)
    Parameters
    Type Name Description
    System.Nullable<System.DateTime> value

    The System.Nullable<T> value to write.

    | Improve this Doc View Source

    WriteValue(Nullable<DateTimeOffset>)

    Writes a System.Nullable<T> value.

    Declaration
    public virtual void WriteValue(DateTimeOffset? value)
    Parameters
    Type Name Description
    System.Nullable<System.DateTimeOffset> value

    The System.Nullable<T> value to write.

    | Improve this Doc View Source

    WriteValue(Nullable<Decimal>)

    Writes a System.Nullable<T> value.

    Declaration
    public virtual void WriteValue(decimal? value)
    Parameters
    Type Name Description
    System.Nullable<System.Decimal> value

    The System.Nullable<T> value to write.

    | Improve this Doc View Source

    WriteValue(Nullable<Double>)

    Writes a System.Nullable<T> value.

    Declaration
    public virtual void WriteValue(double? value)
    Parameters
    Type Name Description
    System.Nullable<System.Double> value

    The System.Nullable<T> value to write.

    | Improve this Doc View Source

    WriteValue(Nullable<Guid>)

    Writes a System.Nullable<T> value.

    Declaration
    public virtual void WriteValue(Guid? value)
    Parameters
    Type Name Description
    System.Nullable<System.Guid> value

    The System.Nullable<T> value to write.

    | Improve this Doc View Source

    WriteValue(Nullable<Int16>)

    Writes a System.Nullable<T> value.

    Declaration
    public virtual void WriteValue(short? value)
    Parameters
    Type Name Description
    System.Nullable<System.Int16> value

    The System.Nullable<T> value to write.

    | Improve this Doc View Source

    WriteValue(Nullable<Int32>)

    Writes a System.Nullable<T> value.

    Declaration
    public virtual void WriteValue(int? value)
    Parameters
    Type Name Description
    System.Nullable<System.Int32> value

    The System.Nullable<T> value to write.

    | Improve this Doc View Source

    WriteValue(Nullable<Int64>)

    Writes a System.Nullable<T> value.

    Declaration
    public virtual void WriteValue(long? value)
    Parameters
    Type Name Description
    System.Nullable<System.Int64> value

    The System.Nullable<T> value to write.

    | Improve this Doc View Source

    WriteValue(Nullable<SByte>)

    Writes a System.Nullable<T> value.

    Declaration
    public virtual void WriteValue(sbyte? value)
    Parameters
    Type Name Description
    System.Nullable<System.SByte> value

    The System.Nullable<T> value to write.

    | Improve this Doc View Source

    WriteValue(Nullable<Single>)

    Writes a System.Nullable<T> value.

    Declaration
    public virtual void WriteValue(float? value)
    Parameters
    Type Name Description
    System.Nullable<System.Single> value

    The System.Nullable<T> value to write.

    | Improve this Doc View Source

    WriteValue(Nullable<TimeSpan>)

    Writes a System.Nullable<T> value.

    Declaration
    public virtual void WriteValue(TimeSpan? value)
    Parameters
    Type Name Description
    System.Nullable<System.TimeSpan> value

    The System.Nullable<T> value to write.

    | Improve this Doc View Source

    WriteValue(Nullable<UInt16>)

    Writes a System.Nullable<T> value.

    Declaration
    public virtual void WriteValue(ushort? value)
    Parameters
    Type Name Description
    System.Nullable<System.UInt16> value

    The System.Nullable<T> value to write.

    | Improve this Doc View Source

    WriteValue(Nullable<UInt32>)

    Writes a System.Nullable<T> value.

    Declaration
    public virtual void WriteValue(uint? value)
    Parameters
    Type Name Description
    System.Nullable<System.UInt32> value

    The System.Nullable<T> value to write.

    | Improve this Doc View Source

    WriteValue(Nullable<UInt64>)

    Writes a System.Nullable<T> value.

    Declaration
    public virtual void WriteValue(ulong? value)
    Parameters
    Type Name Description
    System.Nullable<System.UInt64> value

    The System.Nullable<T> value to write.

    | Improve this Doc View Source

    WriteValue(Object)

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

    Declaration
    public virtual void WriteValue(object value)
    Parameters
    Type Name Description
    System.Object value

    The System.Object value to write.

    | Improve this Doc View Source

    WriteValue(SByte)

    Writes a System.SByte value.

    Declaration
    public virtual void WriteValue(sbyte value)
    Parameters
    Type Name Description
    System.SByte value

    The System.SByte value to write.

    | Improve this Doc View Source

    WriteValue(Single)

    Writes a System.Single value.

    Declaration
    public virtual void WriteValue(float value)
    Parameters
    Type Name Description
    System.Single value

    The System.Single value to write.

    | Improve this Doc View Source

    WriteValue(String)

    Writes a System.String value.

    Declaration
    public virtual void WriteValue(string value)
    Parameters
    Type Name Description
    System.String value

    The System.String value to write.

    | Improve this Doc View Source

    WriteValue(TimeSpan)

    Writes a System.TimeSpan value.

    Declaration
    public virtual void WriteValue(TimeSpan value)
    Parameters
    Type Name Description
    System.TimeSpan value

    The System.TimeSpan value to write.

    | Improve this Doc View Source

    WriteValue(UInt16)

    Writes a System.UInt16 value.

    Declaration
    public virtual void WriteValue(ushort value)
    Parameters
    Type Name Description
    System.UInt16 value

    The System.UInt16 value to write.

    | Improve this Doc View Source

    WriteValue(UInt32)

    Writes a System.UInt32 value.

    Declaration
    public virtual void WriteValue(uint value)
    Parameters
    Type Name Description
    System.UInt32 value

    The System.UInt32 value to write.

    | Improve this Doc View Source

    WriteValue(UInt64)

    Writes a System.UInt64 value.

    Declaration
    public virtual void WriteValue(ulong value)
    Parameters
    Type Name Description
    System.UInt64 value

    The System.UInt64 value to write.

    | Improve this Doc View Source

    WriteValue(Uri)

    Writes a System.Uri value.

    Declaration
    public virtual void WriteValue(Uri value)
    Parameters
    Type Name Description
    System.Uri value

    The System.Uri value to write.

    | Improve this Doc View Source

    WriteValueDelimiter()

    Writes the JSON value delimiter.

    Declaration
    protected virtual void WriteValueDelimiter()
    | Improve this Doc View Source

    WriteWhitespace(String)

    Writes out the given white space.

    Declaration
    public virtual void WriteWhitespace(string ws)
    Parameters
    Type Name Description
    System.String ws

    The string of white space characters.

    Explicit Interface Implementations

    | Improve this Doc View Source

    IDisposable.Dispose()

    Declaration
    void IDisposable.Dispose()

    Implements

    System.IDisposable
    • Improve this Doc
    • View Source
    • 0 Comments
    In This Article
    • Constructors
      • JsonWriter()
    • Fields
      • StateArrayTempate
    • Properties
      • CloseOutput
      • ContainerPath
      • Culture
      • DateFormatHandling
      • DateFormatString
      • DateTimeZoneHandling
      • FloatFormatHandling
      • Formatting
      • Path
      • StringEscapeHandling
      • Top
      • WriteState
    • Methods
      • AutoComplete(JsonToken)
      • BuildStateArray()
      • Close()
      • Dispose(Boolean)
      • Flush()
      • InternalWriteComment()
      • InternalWriteEnd(JsonContainerType)
      • InternalWritePropertyName(String)
      • InternalWriteRaw()
      • InternalWriteStart(JsonToken, JsonContainerType)
      • InternalWriteValue(JsonToken)
      • InternalWriteWhitespace(String)
      • OnStringEscapeHandlingChanged()
      • SetWriteState(JsonToken, Object)
      • UpdateScopeWithFinishedValue()
      • WriteComment(String)
      • WriteEnd()
      • WriteEnd(JsonToken)
      • WriteEndArray()
      • WriteEndConstructor()
      • WriteEndObject()
      • WriteIndent()
      • WriteIndentSpace()
      • WriteNull()
      • WriteProperty(String, Object)
      • WritePropertyName(String)
      • WritePropertyName(String, Boolean)
      • WriteRaw(String)
      • WriteRawValue(String)
      • WriteStartArray()
      • WriteStartConstructor(String)
      • WriteStartObject()
      • WriteToken(JsonReader)
      • WriteToken(JsonReader, Boolean)
      • WriteToken(JsonReader, Boolean, Boolean, Boolean)
      • WriteToken(JsonToken)
      • WriteToken(JsonToken, Object)
      • WriteUndefined()
      • WriteValue(JsonWriter, PrimitiveTypeCode, Object)
      • WriteValue(Boolean)
      • WriteValue(Byte)
      • WriteValue(Byte[])
      • WriteValue(Char)
      • WriteValue(DateTime)
      • WriteValue(DateTimeOffset)
      • WriteValue(Decimal)
      • WriteValue(Double)
      • WriteValue(Guid)
      • WriteValue(Int16)
      • WriteValue(Int32)
      • WriteValue(Int64)
      • WriteValue(Nullable<Boolean>)
      • WriteValue(Nullable<Byte>)
      • WriteValue(Nullable<Char>)
      • WriteValue(Nullable<DateTime>)
      • WriteValue(Nullable<DateTimeOffset>)
      • WriteValue(Nullable<Decimal>)
      • WriteValue(Nullable<Double>)
      • WriteValue(Nullable<Guid>)
      • WriteValue(Nullable<Int16>)
      • WriteValue(Nullable<Int32>)
      • WriteValue(Nullable<Int64>)
      • WriteValue(Nullable<SByte>)
      • WriteValue(Nullable<Single>)
      • WriteValue(Nullable<TimeSpan>)
      • WriteValue(Nullable<UInt16>)
      • WriteValue(Nullable<UInt32>)
      • WriteValue(Nullable<UInt64>)
      • WriteValue(Object)
      • WriteValue(SByte)
      • WriteValue(Single)
      • WriteValue(String)
      • WriteValue(TimeSpan)
      • WriteValue(UInt16)
      • WriteValue(UInt32)
      • WriteValue(UInt64)
      • WriteValue(Uri)
      • WriteValueDelimiter()
      • WriteWhitespace(String)
    • Explicit Interface Implementations
      • IDisposable.Dispose()
    • Implements