A JSON parser.
JSON values are mapped to Pkl values as follows:
Null
Boolean
Number
String
Listing
Dynamic
Mapping
Parser.useMapping
The element order of JSON arrays and objects is maintained.
Determines what the parser produces when parsing JSON objects.
If true, they turn into a Mapping. Otherwise, they turn into a Dynamic.
true
If useMapping is false, JSON object properties named "default" will be shadowed by the built-in Dynamic.default property.
useMapping
false
Dynamic.default
Value converters to apply to parsed values.
For further information see PcfRenderer.converters.
PcfRenderer.converters
Returns the class of this.
this
Returns a string representation of this.
This method is used to convert the values of string interpolation expressions to strings.
Returns this |> transform if this is non-null, and null otherwise.
this |> transform
null
This method is the complement of the ?? operator and the equivalent of an Option type's map and flatMap methods.
??
Option
map
flatMap
Tells if this object has a property with the given name.
name
Returns the value of the property with the given name.
Throws if a property with this name does not exist.
Returns null if a property with this name does not exist.
Converts this object to a Dynamic object.
Converts this object to a Map.
Map
Parses source as a JSON document.
source
Throws if an error occurs during parsing.
If source is a Resource, the resource URI is included in parse error messages.
Resource
A JSON parser.