API:System.JSON.TJSONPathParser
Delphi
TJSONPathParser = record
public type
TToken = (Undefined, Name, ArrayIndex, Eof, Error);
private
FPathPtr: PChar;
FPtr: PChar;
FEndPtr: PChar;
FTokenArrayIndex: Integer;
FTokenName: string;
FToken: TToken;
function GetIsEof: Boolean; inline;
procedure RaiseError(AMsg: PResStringRec);
procedure RaiseErrorFmt(AMsg: PResStringRec; const AParams: array of const);
procedure ParseName;
procedure ParseQuotedName(AQuote: Char);
procedure ParseArrayIndex;
procedure ParseIndexer;
function EnsureLength(ALength: Integer): Boolean; inline;
procedure FrontTrim(var APtr: PChar); inline;
procedure BackTrim(var APtr: PChar); inline;
public
constructor Create(const APath: string); overload;
constructor Create(const APathPtr: PChar; ALen: Integer); overload;
function NextToken: TToken;
property IsEof: Boolean read GetIsEof;
property Token: TToken read FToken;
property TokenName: string read FTokenName;
property TokenArrayIndex: Integer read FTokenArrayIndex;
end;
C++
struct DECLSPEC_DRECORD TJSONPathParser
{
public:
enum class DECLSPEC_DENUM TToken : unsigned char { Undefined, Name, ArrayIndex, Eof, Error };
private:
System::WideChar *FPathPtr;
System::WideChar *FPtr;
System::WideChar *FEndPtr;
int FTokenArrayIndex;
System::UnicodeString FTokenName;
TToken FToken;
bool __fastcall GetIsEof();
void __fastcall RaiseError(System::PResStringRec AMsg);
void __fastcall RaiseErrorFmt(System::PResStringRec AMsg, const System::TVarRec *AParams, const int AParams_High);
void __fastcall ParseName();
void __fastcall ParseQuotedName(System::WideChar AQuote);
void __fastcall ParseArrayIndex();
void __fastcall ParseIndexer();
bool __fastcall EnsureLength(int ALength);
void __fastcall FrontTrim(System::WideChar * &APtr);
void __fastcall BackTrim(System::WideChar * &APtr);
public:
__fastcall TJSONPathParser(const System::UnicodeString APath)/* overload */;
__fastcall TJSONPathParser(const System::WideChar * APathPtr, int ALen)/* overload */;
TToken __fastcall NextToken();
__property bool IsEof = {read=GetIsEof};
__property TToken Token = {read=FToken};
__property System::UnicodeString TokenName = {read=FTokenName};
__property int TokenArrayIndex = {read=FTokenArrayIndex};
TJSONPathParser() {}
};
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
record struct |
public | System.JSON.pas System.JSON.hpp |
System.JSON | System.JSON |
説明
このトピックには現在ドキュメントが存在しません。「ノート」を利用してこのトピックの改良について話しあうことができます。