Пример #1
0
 private object ThrowNotSupported(JsonTokenClass clazz)
 {
     throw this.GetImportException(clazz.Name);
 }
Пример #2
0
 public string ReadToken(JsonTokenClass token)
 {
     string text;
     int depth = this.Depth;
     if (!token.IsTerminator)
     {
         this.MoveToContent();
     }
     if (((depth == 0) && (this.TokenClass == JsonTokenClass.Array)) && (token.IsScalar || (token == JsonTokenClass.Null)))
     {
         this.Read();
         text = this.ReadToken(token);
         this.ReadToken(JsonTokenClass.EndArray);
         return text;
     }
     if (this.TokenClass != token)
     {
         throw new JsonException(string.Format("Found {0} where {1} was expected.", this.TokenClass, token));
     }
     text = this.Text;
     this.Read();
     return text;
 }