Utf8JsonReader.Skip 方法
定义
跳过当前 JSON 令牌的子级。Skips the children of the current JSON token.
public:
void Skip();
public void Skip ();
member this.Skip : unit -> unit
Public Sub Skip ()
例外
已向读取器提供了部分数据,随后会提供更多数据(即 IsFinalBlock 为 false)。The reader was given partial data with more data to follow (that is, IsFinalBlock is false).
根据 JSON RFC,跳过时出现无效 JSON 令牌。An invalid JSON token was encountered while skipping, according to the JSON RFC.
- 或 --or-
当前深度超过由最大深度决定的递归限值。The current depth exceeds the recursive limit set by the maximum depth.
注解
当 TokenType 为时 JsonTokenType.PropertyName ,读取器首先移动到属性值。When TokenType is JsonTokenType.PropertyName, the reader first moves to the property value.
如果 TokenType 最初 (或前进) 为或后 StartObject JsonTokenType.StartArray ,则读取器前进到匹配的 JsonTokenType.EndObject 或 JsonTokenType.EndArray 。When TokenType (originally, or after advancing) is StartObject or JsonTokenType.StartArray, the reader advances to the matching JsonTokenType.EndObject or JsonTokenType.EndArray.
对于所有其他标记类型,读取器不会移动。For all other token types, the reader does not move. 在下一次调用后 Read() ,读取器将在下一个值 (在数组) 时,下一个属性名称 (在对象) 中时)或结束数组/对象标记。After the next call to Read(), the reader will be at the next value (when in an array), the next property name (when in an object), or the end array/object token.