ruagodplatelicker

–views

    Data

    JSON to TypeScript

    Empty arrays become unknown[]. Mixed arrays become a union.

    No file requiredDrop several to batch them into one zip. Paste works too. Nothing is uploaded.

      R runs. Esc cancels. D downloads.

      Ready when you are.

      Before
      —
      After
      —

      How JSON to TypeScript works

      1. Paste a representative object.
      2. Set the root interface name.
      3. Run and download the .ts text.

      The names come from the property keys. A root name you type replaces Root. This is a sample type, not a schema with optional fields, because the sample cannot show which keys are sometimes absent.

      Questions

      Does JSON to TypeScript upload the file?

      No. JSON to TypeScript runs in this browser. Nothing is uploaded.

      What does JSON to TypeScript produce?

      The names come from the property keys. A root name you type replaces Root. This is a sample type, not a schema with optional fields, because the sample cannot show which keys are sometimes absent.

      How is JSON to TypeScript ahead of the usual version?

      2 options are on the page before you run, and Run is the R key.