Equations
Equations
- Lean.JsonNumber.fromNat n = { mantissa := ↑n, exponent := 0 }
Instances For
Equations
- Lean.JsonNumber.fromInt n = { mantissa := n, exponent := 0 }
Instances For
Equations
Equations
Equations
- Lean.JsonNumber.instOfNat = { ofNat := Lean.JsonNumber.fromNat n }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.JsonNumber.ltProp = { lt := fun (a b : Lean.JsonNumber) => a.lt b = true }
Equations
- a.instDecidableLt b = inferInstanceAs (Decidable (a.lt b = true))
Equations
- Lean.JsonNumber.instOrd = { compare := fun (x y : Lean.JsonNumber) => if x < y then Ordering.lt else if x > y then Ordering.gt else Ordering.eq }
Equations
Instances For
Equations
Instances For
Instances For
Equations
- Lean.JsonNumber.instToString = { toString := Lean.JsonNumber.toString }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.JsonNumber.instNeg = { neg := fun (jn : Lean.JsonNumber) => { mantissa := -jn.mantissa, exponent := jn.exponent } }
Equations
- Lean.JsonNumber.instInhabited = { default := 0 }
Attempts to convert a float to a JsonNumber, if the number isn't finite returns the appropriate string from "NaN", "Infinity", "-Infinity".
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.instInhabitedJson = { default := Lean.Json.null }
Equations
Equations
Equations
Instances For
Equations
- Lean.Json.instCoeNat = { coe := fun (n : Nat) => Lean.Json.num (Lean.JsonNumber.fromNat n) }
Equations
- Lean.Json.instCoeInt = { coe := fun (n : Int) => Lean.Json.num (Lean.JsonNumber.fromInt n) }
Equations
- Lean.Json.instCoeString = { coe := Lean.Json.str }
Equations
- Lean.Json.instCoeBool = { coe := Lean.Json.bool }
Equations
- Lean.Json.instOfNat = { ofNat := Lean.Json.num (Lean.JsonNumber.fromNat n) }
Instances For
Equations
- j.getObjValD k = (j.getObjVal? k).toOption.getD Lean.Json.null
Instances For
Equations
- (Lean.Json.obj kvs).setObjVal! x✝¹ x✝ = Lean.Json.obj (kvs.insert x✝¹ x✝)
- x✝².setObjVal! x✝¹ x✝ = panicWithPosWithDecl "Lean.Data.Json.Basic" "Lean.Json.setObjVal!" 281 21 "Json.setObjVal!: not an object: {j}"
Instances For
Assuming both inputs o₁, o₂
are json objects, will compute {...o₁, ...o₂}
.
If o₁
is not a json object, o₂
will be returned.
Equations
- (Lean.Json.obj kvs₁).mergeObj (Lean.Json.obj kvs₂) = Lean.Json.obj (Std.TreeMap.Raw.foldl Std.TreeMap.Raw.insert kvs₁ kvs₂)
- x✝¹.mergeObj x✝ = x✝
Instances For
- arr (elems : Array Json) : Structured
- obj (kvPairs : Std.TreeMap.Raw String Json compare) : Structured