• Manual
  • API Documentation
  • Bayat.Json
  • JsonTextReader

    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 JsonTextReader

    Represents a reader that provides fast, non-cached, forward-only access to JSON text data.

    Inheritance
    System.Object
    JsonReader
    JsonTextReader
    Implements
    System.IDisposable
    IJsonLineInfo
    Inherited Members
    JsonReader._quoteChar
    JsonReader._currentState
    JsonReader._dateParseHandling
    JsonReader._floatParseHandling
    JsonReader.CurrentState
    JsonReader.CloseInput
    JsonReader.SupportMultipleContent
    JsonReader.QuoteChar
    JsonReader.DateTimeZoneHandling
    JsonReader.DateParseHandling
    JsonReader.FloatParseHandling
    JsonReader.DateFormatString
    JsonReader.MaxDepth
    JsonReader.TokenType
    JsonReader.Value
    JsonReader.ValueType
    JsonReader.Depth
    JsonReader.Path
    JsonReader.Culture
    JsonReader.GetPosition(Int32)
    JsonReader.ReadProperty<T>()
    JsonReader.ReadProperty(Type)
    JsonReader.ReadInt32String(String)
    JsonReader.ReadArrayIntoByteArray()
    JsonReader.ReadDoubleString(String)
    JsonReader.ReadBooleanString(String)
    JsonReader.ReadDecimalString(String)
    JsonReader.ReadDateTimeString(String)
    JsonReader.ReadDateTimeOffsetString(String)
    JsonReader.ReaderReadAndAssert()
    JsonReader.CreateUnexpectedEndException()
    JsonReader.ReadIntoWrappedTypeObject()
    JsonReader.Skip()
    JsonReader.SetToken(JsonToken)
    JsonReader.SetToken(JsonToken, Object)
    JsonReader.SetToken(JsonToken, Object, Boolean)
    JsonReader.SetPostValueState(Boolean)
    JsonReader.SetStateBasedOnCurrent()
    JsonReader.IDisposable.Dispose()
    JsonReader.Dispose(Boolean)
    JsonReader.ReadAndAssert()
    JsonReader.ReadAndMoveToContent()
    JsonReader.MoveToContent()
    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 class JsonTextReader : JsonReader, IDisposable, IJsonLineInfo

    Constructors

    | Improve this Doc View Source

    JsonTextReader(TextReader)

    Initializes a new instance of the JsonReader class with the specified System.IO.TextReader.

    Declaration
    public JsonTextReader(TextReader reader)
    Parameters
    Type Name Description
    System.IO.TextReader reader

    The TextReader containing the XML data to read.

    Fields

    | Improve this Doc View Source

    NameTable

    Declaration
    public PropertyNameTable NameTable
    Field Value
    Type Description
    PropertyNameTable

    Properties

    | Improve this Doc View Source

    ArrayPool

    Gets or sets the reader's character buffer pool.

    Declaration
    public IArrayPool<char> ArrayPool { get; set; }
    Property Value
    Type Description
    IArrayPool<System.Char>
    | Improve this Doc View Source

    LineNumber

    Gets the current line number.

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

    The current line number or 0 if no line information is available (for example, HasLineInfo returns false).

    | Improve this Doc View Source

    LinePosition

    Gets the current line position.

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

    The current line position or 0 if no line information is available (for example, HasLineInfo returns false).

    Methods

    | Improve this Doc View Source

    Close()

    Changes the state to closed.

    Declaration
    public override void Close()
    Overrides
    JsonReader.Close()
    | Improve this Doc View Source

    HasLineInfo()

    Gets a value indicating whether the class can return line information.

    Declaration
    public bool HasLineInfo()
    Returns
    Type Description
    System.Boolean

    true if LineNumber and LinePosition can be provided; otherwise, false.

    | Improve this Doc View Source

    Read()

    Reads the next JSON token from the stream.

    Declaration
    public override bool Read()
    Returns
    Type Description
    System.Boolean

    true if the next token was read successfully; false if there are no more tokens to read.

    Overrides
    JsonReader.Read()
    | Improve this Doc View Source

    ReadAsBoolean()

    Reads the next JSON token from the stream as a System.Nullable<T>.

    Declaration
    public override bool? ReadAsBoolean()
    Returns
    Type Description
    System.Nullable<System.Boolean>

    A System.Nullable<T>. This method will return null at the end of an array.

    Overrides
    JsonReader.ReadAsBoolean()
    | Improve this Doc View Source

    ReadAsBytes()

    Reads the next JSON token from the stream as a System.Byte[].

    Declaration
    public override byte[] ReadAsBytes()
    Returns
    Type Description
    System.Byte[]

    A System.Byte[] or a null reference if the next JSON token is null. This method will return null at the end of an array.

    Overrides
    JsonReader.ReadAsBytes()
    | Improve this Doc View Source

    ReadAsDateTime()

    Reads the next JSON token from the stream as a System.Nullable<T>.

    Declaration
    public override DateTime? ReadAsDateTime()
    Returns
    Type Description
    System.Nullable<System.DateTime>

    A System.Nullable<T>. This method will return null at the end of an array.

    Overrides
    JsonReader.ReadAsDateTime()
    | Improve this Doc View Source

    ReadAsDateTimeOffset()

    Reads the next JSON token from the stream as a System.Nullable<T>.

    Declaration
    public override DateTimeOffset? ReadAsDateTimeOffset()
    Returns
    Type Description
    System.Nullable<System.DateTimeOffset>

    A System.Nullable<T>. This method will return null at the end of an array.

    Overrides
    JsonReader.ReadAsDateTimeOffset()
    | Improve this Doc View Source

    ReadAsDecimal()

    Reads the next JSON token from the stream as a System.Nullable<T>.

    Declaration
    public override decimal? ReadAsDecimal()
    Returns
    Type Description
    System.Nullable<System.Decimal>

    A System.Nullable<T>. This method will return null at the end of an array.

    Overrides
    JsonReader.ReadAsDecimal()
    | Improve this Doc View Source

    ReadAsDouble()

    Reads the next JSON token from the stream as a System.Nullable<T>.

    Declaration
    public override double? ReadAsDouble()
    Returns
    Type Description
    System.Nullable<System.Double>

    A System.Nullable<T>. This method will return null at the end of an array.

    Overrides
    JsonReader.ReadAsDouble()
    | Improve this Doc View Source

    ReadAsInt32()

    Reads the next JSON token from the stream as a System.Nullable<T>.

    Declaration
    public override int? ReadAsInt32()
    Returns
    Type Description
    System.Nullable<System.Int32>

    A System.Nullable<T>. This method will return null at the end of an array.

    Overrides
    JsonReader.ReadAsInt32()
    | Improve this Doc View Source

    ReadAsString()

    Reads the next JSON token from the stream as a System.String.

    Declaration
    public override string ReadAsString()
    Returns
    Type Description
    System.String

    A System.String. This method will return null at the end of an array.

    Overrides
    JsonReader.ReadAsString()

    Implements

    System.IDisposable
    IJsonLineInfo
    • Improve this Doc
    • View Source
    • 0 Comments
    In This Article
    • Constructors
      • JsonTextReader(TextReader)
    • Fields
      • NameTable
    • Properties
      • ArrayPool
      • LineNumber
      • LinePosition
    • Methods
      • Close()
      • HasLineInfo()
      • Read()
      • ReadAsBoolean()
      • ReadAsBytes()
      • ReadAsDateTime()
      • ReadAsDateTimeOffset()
      • ReadAsDecimal()
      • ReadAsDouble()
      • ReadAsInt32()
      • ReadAsString()
    • Implements