Equations
- Lean.instHashableJsonNumber = { hash := Lean.hashJsonNumber✝ }
Equations
- Lean.JsonNumber.fromInt n = { mantissa := n, exponent := 0 }
Instances For
Equations
- Lean.JsonNumber.instCoeInt = { coe := Lean.JsonNumber.fromInt }
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 }
Instances For
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
- One or more equations did not get rendered due to their size.
- { mantissa := m, exponent := 0 }.toString = m.repr
Instances For
Equations
Instances For
Instances For
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.Json.instBEq = { beq := Lean.Json.beq'✝ }
Equations
- Lean.Json.instHashable = { hash := Lean.Json.hash'✝ }
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.null.isNull = true
- x.isNull = false
Instances For
Equations
- (Lean.Json.obj kvs).getObj? = pure kvs
- x.getObj? = throw "object expected"
Instances For
Equations
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 (Lean.RBNode.fold (Lean.RBNode.insert compare) kvs₁ kvs₂)
- x✝.mergeObj x = x
Instances For
- arr: Array Lean.Json → Lean.Json.Structured
- obj: (Lean.RBNode String fun (x : String) => Lean.Json) → Lean.Json.Structured
Instances For
Equations
instance
Lean.Json.instCoeRBNodeStringStructured :
Coe (Lean.RBNode String fun (x : String) => Lean.Json) Lean.Json.Structured