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
Instances For
@[inline]
Equations
Instances For
@[instance_reducible]
Equations
- Lake.JsonObject.instCoeJson = { coe := Lean.Json.obj }
@[instance_reducible]
Equations
- Lake.JsonObject.instToJson = { toJson := Lake.JsonObject.toJson }
@[instance_reducible]
Equations
- Lake.JsonObject.instFromJson = { fromJson? := Lake.JsonObject.fromJson? }
Equations
- obj.insertJson prop val = Std.TreeMap.Raw.insert obj prop (Lean.toJson val)
Instances For
@[inline]
def Lake.JsonObject.insert {α : Type u_1} [Lean.ToJson α] (obj : JsonObject) (prop : String) (val : α) :
Equations
- obj.insert prop val = obj.insertJson prop (Lean.toJson val)
Instances For
@[inline]
def Lake.JsonObject.insertSome {α : Type u_1} [Lean.ToJson α] (obj : JsonObject) (prop : String) (val? : Option α) :
Equations
- obj.insertSome prop (some val) = obj.insert prop val
- obj.insertSome prop val? = obj
Instances For
Equations
- obj.erase prop = Std.TreeMap.Raw.erase obj prop
Instances For
Equations
- obj.getJson? prop = Std.TreeMap.Raw.get? obj prop
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
Equations
- Lake.JsonObject.getAs α obj prop = obj.get prop
Instances For
@[inline]
Equations
Instances For
@[inline]
Equations
- Lake.JsonObject.getAs? α obj prop = obj.get? prop
Instances For
@[macro_inline]
def Lake.JsonObject.getD {α : Type u_1} [Lean.FromJson α] (obj : JsonObject) (prop : String) (default : α) :