JSON Object #
Defines a convenient wrapper type for JSON object data that makes indexing fields more convenient.
@[reducible, inline]
A JSON object (Json.obj
data).
Equations
- Lake.JsonObject = Lean.RBNode String fun (x : String) => Lean.Json
Instances For
Equations
- Lake.JsonObject.instCoeJson = { coe := Lean.Json.obj }
Equations
- Lake.JsonObject.instToJson = { toJson := Lake.JsonObject.toJson }
Equations
- Lake.JsonObject.instFromJson = { fromJson? := Lake.JsonObject.fromJson? }
@[inline]
def
Lake.JsonObject.insert
{α : Type u_1}
[Lean.ToJson α]
(obj : Lake.JsonObject)
(prop : String)
(val : α)
:
Equations
- obj.insert prop val = Lean.RBNode.insert compare obj prop (Lean.toJson val)
Instances For
@[inline]
def
Lake.JsonObject.insertSome
{α : Type u_1}
[Lean.ToJson α]
(obj : Lake.JsonObject)
(prop : String)
(val? : Option α)
:
Instances For
Equations
- obj.erase prop = inline (Lean.RBNode.erase compare prop obj)
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[macro_inline]
def
Lake.JsonObject.getD
{α : Type u_1}
[Lean.FromJson α]
(obj : Lake.JsonObject)
(prop : String)
(default : α)
: