/// <summary>
 /// Constructs a JsonFormatReader to parse Json into a message
 /// </summary>
 internal JsonFormatReader(JsonCursor input)
 {
     _input    = input;
     _stopChar = new Stack <int>();
     _stopChar.Push(-1);
     _state = ReaderState.Start;
 }
 /// <summary>
 /// Constructs a JsonFormatReader to parse Json into a message
 /// </summary>
 protected JsonFormatReader(TextReader input)
     : this(JsonCursor.CreateInstance(input))
 {
 }
 /// <summary>
 /// Constructs a JsonFormatReader to parse Json into a message
 /// </summary>
 public static JsonFormatReader CreateInstance(TextReader input)
 {
     return(new JsonFormatReader(JsonCursor.CreateInstance(input)));
 }
 /// <summary>
 /// Constructs a JsonFormatReader to parse Json into a message
 /// </summary>
 public static JsonFormatReader CreateInstance(string jsonText)
 {
     return(new JsonFormatReader(JsonCursor.CreateInstance(jsonText)));
 }
 /// <summary>
 /// Constructs a JsonFormatReader to parse Json into a message, this method does not use text encoding, all bytes MUST
 /// represent ASCII character values.
 /// </summary>
 public static JsonFormatReader CreateInstance(byte[] bytes)
 {
     return(new JsonFormatReader(JsonCursor.CreateInstance(bytes)));
 }
 /// <summary>
 /// Constructs a JsonFormatReader to parse Json into a message, this method does not use text encoding, all bytes MUST
 /// represent ASCII character values.
 /// </summary>
 public static JsonFormatReader CreateInstance(Stream stream)
 {
     return(new JsonFormatReader(JsonCursor.CreateInstance(stream)));
 }