def finish

bend-toon-codec@0.1.0.0 · src/frame.bend:120

import bend-toon-codec@0.1.0.0/src/frame.bend as Frame
import Base
import bend-toon-codec@0.1.0.0/src/json.bend as J

120def finish(+f: Fr, +strict: Bool) -> Result<&2, &2, String, J.Json>:
121  match f:
122    case FObj{d, a, fs}:
123      Done{J.JObj{rev.fields(fs, J.JNil{})}}
124    case FLst{d, a, n, c, xs}:
125      fin.arr(count.ok(strict, n, c), xs)
126    case FTab{d, a, n, c, dl, ks, xs}:
127      fin.arr(count.ok(strict, n, c), xs)

Uses (8)

Used by (1)