def fields
import bend-kit-jwt@0.11.0.1/jwt.bend as Jwtimport Base
import bend-kit-json@0.7.0.0/json.bend as Json
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
223# An object's members, names as octets, last first.
224def fields(kvs: List<&1, Bytes.Bytes & Json.Val>, acc: List<&2, Field>) -> List<&2, Field>:
225 match kvs:
226 case Nil{}:
227 acc
228 case (k, v) <> t:
229 fields(t, Con{Field{Bytes.to_string(k), lit(v)}, acc})