Class: JSONVarParser
JSON is useful when using fetch. You can get all the properties of a JSON object using parameters.
Examples
{json(name):value}
{json(data):{"name": "John Doe", "age": 30}}
Your age is `{data.age}`.
Extends
Implements
Constructors
new JSONVarParser()
new JSONVarParser():
JSONVarParser
Returns
Overrides
Source
lib/Parsers/JSONVar.ts:22
Properties
acceptedNames
protected
acceptedNames:string
[]
Inherited from
Source
lib/Parsers/Base.ts:8
requiredParameter
protected
requiredParameter:boolean
Inherited from
Source
lib/Parsers/Base.ts:10
requiredPayload
protected
requiredPayload:boolean
Inherited from
Source
lib/Parsers/Base.ts:12
Methods
parse()
parse(
ctx
):string
Parameters
• ctx: Context
Returns
string
Implementation of
Source
lib/Parsers/JSONVar.ts:26
toJSON()
toJSON():
object
Returns
object
acceptedNames
acceptedNames:
string
[]
requiredParameter
requiredParameter:
boolean
requiredPayload
requiredPayload:
boolean
Inherited from
Source
lib/Parsers/Base.ts:29
willAccept()
willAccept(
ctx
):boolean
Parameters
• ctx: Context
Returns
boolean
Implementation of
Inherited from
Source
lib/Parsers/Base.ts:20