@[instance_reducible]
Equations
Instances For
Equations
Instances For
@[instance_reducible]
Equations
Equations
- Lean.JsonNumber.fromNat n = { mantissa := ↑n, exponent := 0 }
Instances For
Equations
- Lean.JsonNumber.fromInt n = { mantissa := n, exponent := 0 }
Instances For
@[instance_reducible]
Equations
@[instance_reducible]
Equations
@[instance_reducible]
Equations
- Lean.JsonNumber.instOfNat = { ofNat := Lean.JsonNumber.fromNat n }
Represents n = mantissa * 10^-exponent as (sign, mantissa', exponent'),
where sign ∈ {-1,0,1} and n = sign * 0.mantissa' * 10^exponent'.
This is a normal form: if m1 * 10^-e1 = m2 * 10^-e2,
then normalize ⟨m1, e1⟩ == normalize ⟨m2, e2⟩.
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
@[instance_reducible]
Equations
- Lean.JsonNumber.ltProp = { lt := fun (a b : Lean.JsonNumber) => a.lt b = true }
@[instance_reducible]
Equations
- a.instDecidableLt b = instDecidableEqBool (a.lt b) true
@[instance_reducible]
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
shiftr n s shifts n by s places to the right, i.e., divides it by 10^s.
Instances For
@[instance_reducible]
Equations
- Lean.JsonNumber.instToString = { toString := Lean.JsonNumber.toString }
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[instance_reducible]
Equations
- Lean.JsonNumber.instNeg = { neg := fun (jn : Lean.JsonNumber) => { mantissa := -jn.mantissa, exponent := jn.exponent } }
@[instance_reducible]
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
@[instance_reducible]
Equations
- Lean.instInhabitedJson = { default := Lean.instInhabitedJson.default }
@[instance_reducible]
Equations
@[instance_reducible]
Equations
Equations
Instances For
@[instance_reducible]
Equations
- Lean.Json.instCoeNat = { coe := fun (n : Nat) => Lean.Json.num (Lean.JsonNumber.fromNat n) }
@[instance_reducible]
Equations
- Lean.Json.instCoeInt = { coe := fun (n : Int) => Lean.Json.num (Lean.JsonNumber.fromInt n) }
@[instance_reducible]
Equations
- Lean.Json.instCoeString = { coe := Lean.Json.str }
@[instance_reducible]
Equations
- Lean.Json.instCoeBool = { coe := Lean.Json.bool }
@[instance_reducible]
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!" 290 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
Instances For
@[instance_reducible]
Equations
@[instance_reducible]