json-to-ts icon indicating copy to clipboard operation
json-to-ts copied to clipboard

Convert jsons to typescript interfaces

Results 16 json-to-ts issues
Sort by recently updated
recently updated
newest added

Some back-end team specifications keep the object's keys snakeCase style, adding options to make them more flexible.

RE: https://github.com/MariusAlch/json-to-ts/issues/17 https://github.com/MariusAlch/json-to-ts/issues/5 By reading through the issues, I know the current handling of optional fields is by design, and I understand the reasoning, especially as JSON doesn't support undefined....

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.21. Commits f299b52 Bump to v4.17.21 c4847eb Improve performance of toNumber, trim and trimEnd on large input strings 3469357 Prevent command injection through _.template's variable...

dependencies

see https://github.com/MariusAlch/json-to-ts/issues/7

https://pastebin.com/tnx6CH5a This JSON, will cause ``` TypeError: Reduce of empty array with no initial value at Array.reduce () at pascalCase (.../node_modules/json-to-ts/build/src/get-names.js:82:10) ``` I tried change ```diff - .reduce(function (a, b)...

I didn't add the test cases of that which use '#@#123#@#' or 'hello world' as property key. The keys seem not valid on typescript and i didn't find the way...

null is treated as a non existing member. This is not correct. i.e. ```js JSON.parse('{ "something": [ {"x":1},{"x":"a"},{"x":null} ]}') ``` returns ```js { something: [ { x: 1 }, {...

It would be nice to support documentation for properties and entities, for example: ```ts /** A Button is a clickable UI element */ interface Button { /** The label will...

Is there any way, with nested json structure, to have json-to-ts produce a single interface with the nesting rather than all the individual ones? Example: { "Person": { "name": "Bob",...

The "Try it Online" link in the readme instructions is currently going to a massive malware site and should be removed/updated/fixed.