#include <parser.h>
Public Types | |
using | RESTRICT_DICTIONARY_PROPS = PARSERPARAMETERS::RESTRICT |
Public Member Functions | |
MAXON_METHOD Result< void > | Read (UrlOrInputStream &&nameOrStream, PARSERFLAGS flags, const StringDecodingRef &stringDecoding, const ValueReceiver< const DataDictionary & > &objects, BaseArray< Char > *originalToken=nullptr) |
MAXON_FUNCTION Result< void > | ReadString (const Block< const Char > &parserData, PARSERFLAGS flags, const StringDecodingRef &stringDecoding, const ValueReceiver< const DataDictionary & > &objects) |
MAXON_FUNCTION Result< void > | ReadString (const String &text, PARSERFLAGS flags, const StringDecodingRef &stringDecoding, const ValueReceiver< const DataDictionary & > &objects) |
MAXON_METHOD Result< void > | Write (const DataDictionary &object, String &string, Bool niceFormatting) |
MAXON_METHOD Result< void > | WriteFile (UrlOrOutputStream &&out, const StringEncodingRef &stringEncoding, const DataDictionary &dict, Bool niceFormatting) |
MAXON_METHOD String | GetFileExtension () const |
Private Member Functions | |
MAXON_INTERFACE (ParserInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interface.parser") | |
using RESTRICT_DICTIONARY_PROPS = PARSERPARAMETERS::RESTRICT |
|
private |
MAXON_METHOD Result<void> Read | ( | UrlOrInputStream && | nameOrStream, |
PARSERFLAGS | flags, | ||
const StringDecodingRef & | stringDecoding, | ||
const ValueReceiver< const DataDictionary & > & | objects, | ||
BaseArray< Char > * | originalToken = nullptr |
||
) |
ConvertFromJWT converts a JWT token into a json DataDictionary. For more details of JWT see https://jwt.io/
[in] | nameOrStream | JSON formated input stream or file url. |
[in] | flags | See JWTPARSERFLAGS. |
[in] | objects | ValueReceiver which receives all processed DataDictionaries. |
[out] | originalToken | [Optional] Returns the original token memory read from the stream. |
MAXON_FUNCTION Result<void> ReadString | ( | const Block< const Char > & | parserData, |
PARSERFLAGS | flags, | ||
const StringDecodingRef & | stringDecoding, | ||
const ValueReceiver< const DataDictionary & > & | objects | ||
) |
ConvertFromJSON parses a json string into DataDictionary representation.
[in] | parserData | JSON formated string to precess. |
[in] | flags | See JSONPARSERFLAGS. |
[in] | stringDecoding | ValueReceiver which receives all processed DataDictionaries. |
[in] | objects | ValueReceiver which receives all processed DataDictionaries. |
MAXON_FUNCTION Result<void> ReadString | ( | const String & | text, |
PARSERFLAGS | flags, | ||
const StringDecodingRef & | stringDecoding, | ||
const ValueReceiver< const DataDictionary & > & | objects | ||
) |
MAXON_METHOD Result<void> Write | ( | const DataDictionary & | object, |
String & | string, | ||
Bool | niceFormatting | ||
) |
ConvertToJSON converts a data dictionary into a JSON string.
[in] | object | DataDictionary to convert. |
[out] | string | Result string. |
[in] | niceFormatting | True to have nice formatting with indents and new lines. False to get compact format (smaller filesize). |
MAXON_METHOD Result<void> WriteFile | ( | UrlOrOutputStream && | out, |
const StringEncodingRef & | stringEncoding, | ||
const DataDictionary & | dict, | ||
Bool | niceFormatting | ||
) |
MAXON_METHOD String GetFileExtension | ( | ) | const |
GetFileExtension gives the file extension of the parser.