// Unmarshal unmarshals a response body for the REST JSON protocol. func Unmarshal(r *request.Request) { if t := rest.PayloadType(r.Data); t == "structure" || t == "" { jsonrpc.Unmarshal(r) } else { rest.Unmarshal(r) } }
// Build builds a request for the REST JSON protocol. func Build(r *request.Request) { rest.Build(r) if t := rest.PayloadType(r.Params); t == "structure" || t == "" { jsonrpc.Build(r) } }