StaticparseParses JSON without throwing.
The expected shape. Unverified: this parses, it does not validate. The caller checks the fields it needs on the parsed value.
The raw text to parse.
The parsed value, or null when the text is not usable JSON.
JSON helpers for untrusted input.
Remarks
A request body is whatever the client sent.
JSON.parseanswers that with an exception, which pushes atry/catchinto every route that reads a body; these helpers answer with a value instead, so a handler can decide the status code in one line.Pure, vendor-neutral, and previously written identically in two consumers — which is the test this module's own remarks set for belonging here rather than in an application.
Example
Author
Bayu Dwiyan Satria
Version
1.0.0
Since
1.3.0