Class: JSONVarParser
JSON is useful when using fetch. You can get all the properties of a JSON object using parameters.
Example
{json(name):value}Example
{json(data):{"name": "John Doe", "age": 30}}
Your age is `{data.age}`.Hierarchy
-
↳
JSONVarParser
Implements
Constructors
constructor
• new JSONVarParser()
Overrides
Properties
acceptedNames
• Protected acceptedNames: string[]
Inherited from
requiredParameter
• Protected requiredParameter: boolean
Inherited from
requiredPayload
• Protected requiredPayload: boolean
Inherited from
Methods
parse
▸ parse(ctx): string
Parses the given tag.
Parameters
| Name | Type | Description |
|---|---|---|
ctx | Context | The context of the tag. |
Returns
string
Implementation of
willAccept
▸ willAccept(ctx): boolean
Whether the parser can handle the given tag.
Parameters
| Name | Type | Description |
|---|---|---|
ctx | Context | The context of the tag. |
Returns
boolean