System.JSON.TJSONPathParser.NextToken

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function NextToken: TToken;

C++

TToken __fastcall NextToken();

Properties

Type Visibility Source Unit Parent
function public
System.JSON.pas
System.JSON.hpp
System.JSON TJSONPathParser

Description

Returns the next token of the JSON path that you passed to the constructor of this JSON path parser.

Tokens that NextToken Returns

NextToken may return any of the following tokens:

Token Description

ArrayIndex

The next token in the JSON path is the index of an item of a JSON array. TokenArrayIndex contains the target index.

Name

The next token in the JSON path is the key of a key-value pair of a JSON object. TokenName contains the target key.

Eof

You have reached the end of the JSON path.

You cannot continue iterating through the path, if you call NextToken again on this instance of TJSONPathParser an exception raises.

Error

There is an error in the specified JSON path.

You cannot continue iterating through the path, if you call NextToken again on this instance of TJSONPathParser an exception raises.

Exceptions

Exception Message Scenarios

Exception

End of path

  • Your previous call to NextToken returned an Eof token.

Error in path

  • Your previous call to NextToken returned an Error token.

See Also