• Manual
  • API Documentation
  • Bayat.Json.Bson
  • BsonReader

    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 BsonReader

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

    Inheritance
    System.Object
    JsonReader
    BsonReader
    Implements
    System.IDisposable
    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.ReadAsInt32()
    JsonReader.ReadInt32String(String)
    JsonReader.ReadAsString()
    JsonReader.ReadAsBytes()
    JsonReader.ReadArrayIntoByteArray()
    JsonReader.ReadAsDouble()
    JsonReader.ReadDoubleString(String)
    JsonReader.ReadAsBoolean()
    JsonReader.ReadBooleanString(String)
    JsonReader.ReadAsDecimal()
    JsonReader.ReadDecimalString(String)
    JsonReader.ReadAsDateTime()
    JsonReader.ReadDateTimeString(String)
    JsonReader.ReadAsDateTimeOffset()
    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.Bson
    Assembly: Bayat.Json.Runtime.dll
    Syntax
    public class BsonReader : JsonReader, IDisposable

    Constructors

    | Improve this Doc View Source

    BsonReader(BinaryReader)

    Initializes a new instance of the BsonReader class.

    Declaration
    public BsonReader(BinaryReader reader)
    Parameters
    Type Name Description
    System.IO.BinaryReader reader

    The reader.

    | Improve this Doc View Source

    BsonReader(BinaryReader, Boolean, DateTimeKind)

    Initializes a new instance of the BsonReader class.

    Declaration
    public BsonReader(BinaryReader reader, bool readRootValueAsArray, DateTimeKind dateTimeKindHandling)
    Parameters
    Type Name Description
    System.IO.BinaryReader reader

    The reader.

    System.Boolean readRootValueAsArray

    if set to true the root object will be read as a JSON array.

    System.DateTimeKind dateTimeKindHandling

    The System.DateTimeKind used when reading System.DateTime values from BSON.

    | Improve this Doc View Source

    BsonReader(Stream)

    Initializes a new instance of the BsonReader class.

    Declaration
    public BsonReader(Stream stream)
    Parameters
    Type Name Description
    System.IO.Stream stream

    The stream.

    | Improve this Doc View Source

    BsonReader(Stream, Boolean, DateTimeKind)

    Initializes a new instance of the BsonReader class.

    Declaration
    public BsonReader(Stream stream, bool readRootValueAsArray, DateTimeKind dateTimeKindHandling)
    Parameters
    Type Name Description
    System.IO.Stream stream

    The stream.

    System.Boolean readRootValueAsArray

    if set to true the root object will be read as a JSON array.

    System.DateTimeKind dateTimeKindHandling

    The System.DateTimeKind used when reading System.DateTime values from BSON.

    Properties

    | Improve this Doc View Source

    DateTimeKindHandling

    Gets or sets the System.DateTimeKind used when reading System.DateTime values from BSON.

    Declaration
    public DateTimeKind DateTimeKindHandling { get; set; }
    Property Value
    Type Description
    System.DateTimeKind

    The System.DateTimeKind used when reading System.DateTime values from BSON.

    | Improve this Doc View Source

    JsonNet35BinaryCompatibility

    Gets or sets a value indicating whether binary data reading should compatible with incorrect Json.NET 3.5 written binary.

    Declaration
    [Obsolete("JsonNet35BinaryCompatibility will be removed in a future version of Json.NET.")]
    public bool JsonNet35BinaryCompatibility { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false.

    | Improve this Doc View Source

    ReadRootValueAsArray

    Gets or sets a value indicating whether the root object will be read as a JSON array.

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

    true if the root object will be read as a JSON array; otherwise, false.

    Methods

    | Improve this Doc View Source

    Close()

    Changes the JsonReader.State to Closed.

    Declaration
    public override void Close()
    Overrides
    JsonReader.Close()
    | 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()

    Implements

    System.IDisposable
    • Improve this Doc
    • View Source
    • 0 Comments
    In This Article
    • Constructors
      • BsonReader(BinaryReader)
      • BsonReader(BinaryReader, Boolean, DateTimeKind)
      • BsonReader(Stream)
      • BsonReader(Stream, Boolean, DateTimeKind)
    • Properties
      • DateTimeKindHandling
      • JsonNet35BinaryCompatibility
      • ReadRootValueAsArray
    • Methods
      • Close()
      • Read()
    • Implements