Jwt.parse.json: def of bend-kit-jwt@0.11.0.1 Import: import bend-kit-jwt@0.11.0.1/jwt.bend as Jwt Lines 258-266 of bend-kit-jwt@0.11.0.1/jwt.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-jwt@0.11.0.1/jwt.bend&start_line=258&end_line=266 import 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 # RFC 7515 ยง5.2 allows rejecting repeated names; a second "alg" is how parsers come to disagree. # parse.claims rejects them at every depth with Json.unique.parsed before members get here. def parse.json(h: Maybe<&1, Json.Val>, f: Maybe<&1, Json.Val>, c: Maybe<&1, Json.Val>, input: Bytes.Bytes, sig: Bytes.Bytes) -> Result<&1, &1, Err, Parts>: match h f c: case Some{Json.Obj{hk}} Some{Json.Obj{fk}} Some{cv}: Done{Parts{fields(hk, Nil{}), fields(fk, Nil{}), cv, input, sig}} case _ _ _: Fail{Malformed{}} Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=bend-kit-json@0.7.0.0/json.bend&name=Val https://jend.leeeet.dev/definition.txt?path=bend-kit-jwt@0.11.0.1/jwt.bend&name=Err https://jend.leeeet.dev/definition.txt?path=bend-kit-jwt@0.11.0.1/jwt.bend&name=Parts https://jend.leeeet.dev/definition.txt?path=bend-kit-jwt@0.11.0.1/jwt.bend&name=fields