🔗 Function: asJSON()
asJSON<
T
>(fallback
):AttributeParser
<T
>
Defined in: src/lib/parsers.ts:101
Parse an attribute as a JSON serialized object with a fallback
🔗 Type Parameters
🔗 T
T
extends object
🔗 Parameters
🔗 fallback
T
fallback value
🔗 Returns
parser function
🔗 Since
0.11.0
🔗 Throws
if the value and fallback are both null or undefined
🔗 Throws
if the value is not a valid JSON object