JSON-like syntax for Lean. #
Now you can write
open Std.Json
#eval json% {
hello : "world",
cheese : ["edam", "cheddar", {kind : "spicy", rank : 100.2}],
lemonCount : 100e30,
isCool : true,
isBug : null,
lookACalc: $(23 + 54 * 2)
}
Equations
- One or more equations did not get rendered due to their size.
Instances For
Json syntactic category
Equations
Instances For
Json null value syntax.
Equations
- Std.Json.jsoNull = Lean.ParserDescr.node `Std.Json.jsoNull 1024 (Lean.ParserDescr.nonReservedSymbol "null" false)
Instances For
Json true value syntax.
Equations
- Std.Json.jsoTrue = Lean.ParserDescr.node `Std.Json.jsoTrue 1024 (Lean.ParserDescr.nonReservedSymbol "true" false)
Instances For
Json false value syntax.
Equations
- Std.Json.jsoFalse = Lean.ParserDescr.node `Std.Json.jsoFalse 1024 (Lean.ParserDescr.nonReservedSymbol "false" false)
Instances For
Json string syntax.
Equations
- Std.Json.jso_ = Lean.ParserDescr.node `Std.Json.jso_ 1022 (Lean.ParserDescr.const `str)
Instances For
Json number negation syntax for ordinary numbers.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Json number negation syntax for scientific numbers.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Json array syntax.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Json identifier syntax.
Equations
- Std.Json.jsoIdent = Lean.ParserDescr.nodeWithAntiquot "jsoIdent" `Std.Json.jsoIdent (Lean.ParserDescr.binary `orelse (Lean.ParserDescr.const `ident) (Lean.ParserDescr.const `str))
Instances For
Json key/value syntax.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Json object syntax.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Allows to use Json syntax in a Lean file.
Equations
- Std.Json.«termJson%_» = Lean.ParserDescr.node `Std.Json.termJson%_ 1022 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "json% ") (Lean.ParserDescr.cat `jso 0))