def decode.shape

bend-kit-migrate@0.3.0.0 · migrate.bend:613

import bend-kit-migrate@0.3.0.0/migrate.bend as Migrate
import Base
import bend-kit-json@0.7.0.0/json.bend as Json

613# The record an object describes, before the business rules.
614def decode.shape(v: Json.Val) -> Result<&1, &1, Error, Record>:
615  match v:
616    case Json.Obj{kvs}:
617      Result.bind(&1, &1, Error, Slots, Record, collect(kvs, Done{Slots.empty()}), build)
618    case _:
619      Fail{Malformed{}}

Uses (9)

Used by (1)