@chenxxx/json2class

json2class

Usage no npm install needed!

<script type="module">
  import chenxxxJson2class from 'https://cdn.skypack.dev/@chenxxx/json2class';
</script>

README

JSON to TypeScript Class

A zero-dependencies package to generate TypeScript interfaces from JSON data

Installation

npm install @chenxxx/json2class

Usage

const json2class = require('@chenxxx/json2class')
const interface = @chenxxx/json2class.generate(A_VALID_JSON)

Known issues

  • A trailing comma will make your JSON invalid

Contributing

Issues and pull requests are always welcome

Thankfor

https://github.com/michelefenu/json2interface