JavaScript tools
Format JSON safely: know what parsing can change
Format a JSON response with JavaScript, handle invalid input and spot cases where parsing can lose information.
Read guidePractical JavaScript and TypeScript tools, with notes on what they can and cannot tell you. Start with a JSON sample.
Paste JSON to sketch a TypeScript type. It describes this sample, not every response your API might return.
This type describes one sample. Review optional fields and other possible responses before using it. It does not validate API responses.
JavaScript tools
Format a JSON response with JavaScript, handle invalid input and spot cases where parsing can lose information.
Read guideTypeScript
Use runtime guards to narrow uncertain values and satisfies to check configurations without confusing the two.
Read guideDates and data
Show one JavaScript timestamp in London and Paris, keep UTC output separate and test seasonal differences.
Read guide