Version 3.3.1.2

JsonTextReader class

Namespace: Sirenix.Serialization
Assembly: Sirenix.Serialization
public class JsonTextReader : IDisposable
Parses json entries from a stream.
Inheritance
  • System.Object
  • JsonTextReader
See Also
  • System.IDisposable

Constructors

JsonTextReader(Stream, DeserializationContext)
Initializes a new instance of the JsonTextReader class.
public JsonTextReader(Stream stream, DeserializationContext context)
Parameters
System.IO.Stream stream

The stream to parse from.

DeserializationContext context

The deserialization context to use.

Exceptions
System.ArgumentNullException

The stream is null.

System.ArgumentException

Cannot read from the stream.

Properties

Context
The current deserialization context used by the text reader.
public DeserializationContext Context { get; }

Methods

Dispose()
Disposes all resources kept by the text reader, except the stream, which can be reused later.
public void Dispose()
ReadToNextEntry(out String, out String, out EntryType)
Reads to (but not past) the beginning of the next json entry, and returns the entry name, contents and type.
public void ReadToNextEntry(out string name, out string valueContent, out EntryType entry)
Parameters
System.String name

The name of the entry that was parsed.

System.String valueContent

The content of the entry that was parsed.

EntryType entry

The type of the entry that was parsed.

Reset()
Resets the reader instance's currently peeked char and emergency playback queue.
public void Reset()