def of_inner

bend-toon-codec@0.1.0.0 · main.bend:83

import bend-toon-codec@0.1.0.0/main.bend as BendToonCodec
import Base
import bend-toon-codec@0.1.0.0/src/json.bend as I

83def of_inner(j: I.Json) -> Json:
84  match j:
85    case I.JNull{}:
86      JNull{}
87    case I.JBool{b}:
88      JBool{b}
89    case I.JNum{t}:
90      JNum{t}
91    case I.JStr{s}:
92      JStr{s}
93    case I.JArr{x}:
94      JArr{of_inner(x)}
95    case I.JObj{x}:
96      JObj{of_inner(x)}
97    case I.JNil{}:
98      JNil{}
99    case I.JCons{h, t}:
100      JCons{of_inner(h), of_inner(t)}
101    case I.JField{k, v, t}:
102      JField{k, of_inner(v), of_inner(t)}

Uses (2)

Used by (1)