def Client.json.of
import bend-kube-runtime@0.2.0.0/src/client.bend as Clientimport Base
import bend-kube-runtime@0.2.0.0/src/json.bend as J
527# A 2xx reply's body as JSON; any other status as the Status it carries.
528def Client.json.of(r: Result<&2, &2, KErr, Reply>) -> Result<&2, &2, KErr, J.Json>:
529 match r:
530 case Done{Reply{+c, body}}:
531 Client.json.status(c, J.Json.parse(body), Bool.and(U32.is_ge(c, 200), U32.is_lt(c, 300)))
532 case Fail{e}:
533 Fail{e}