Parses one request-body text as JSON, the ONE parse all three IRequestjson() implementations share (X37-1, M90f).
The served HTTP path (@setu-ts/runtime), the kernel's inject(), and
@setu-ts/testing's MockRequest each used to run their own
JSON.parse, so fixing the malformed-body status at one of them left the
other two answering a different status for the same request — and fixing
only the kernel's would have made every served request answer 500
while the in-process test path answered 400. One shared parse keeps the
@throws contract on IRequest.json true at every producer.
Parameters
text: string
The body text to parse
Returns unknown
The parsed JSON value
Throws
When text is not valid JSON; the
platform SyntaxError is carried as cause
Parses one request-body text as JSON, the ONE parse all three
IRequestjson()implementations share (X37-1, M90f).The served HTTP path (
@setu-ts/runtime), the kernel'sinject(), and@setu-ts/testing'sMockRequesteach used to run their ownJSON.parse, so fixing the malformed-body status at one of them left the other two answering a different status for the same request — and fixing only the kernel's would have made every served request answer500while the in-process test path answered400. One shared parse keeps the@throwscontract onIRequest.jsontrue at every producer.