@@ -10,37 +10,38 @@ An open-source tool for developers to generate TypeScript types from JSON object
10
10
11
11
- ** Fast Conversion** : Generate TypeScript interfaces from JSON in seconds.
12
12
- ** Nested Objects Support** : Handles deeply nested structures with ease.
13
+ - ** Array Depth Detection** : Automatically detects array depth and types.
14
+ - ** ISO Date Recognition** : Converts valid ISO date strings to ` Date ` type.
13
15
- ** Secure Offline Use** : No need to paste your data online—works locally.
14
- - ** Customizable** : Future support for advanced type handling and customizations .
16
+ - ** Customizable Future Enhancements ** : Support for advanced type handling and customizable options in future updates .
15
17
16
18
---
17
19
18
20
## 📦 Installation
19
21
20
- Install the package via NPM :
22
+ You can install the package globally using any of these package managers :
21
23
24
+ ** Using NPM:**
22
25
``` bash
23
26
npm install -g @typeweaver/json2ts
24
27
```
25
28
26
- ---
27
-
28
- ## 🛠️ Usage
29
-
30
- ### CLI
31
- Convert a JSON file to a TypeScript interface:
32
-
29
+ ** Using Yarn:**
33
30
``` bash
34
- json2ts convert input.json output.ts
31
+ yarn global add @typeweaver/json2ts
35
32
```
36
33
37
- Or use JSON from the clipboard:
38
-
34
+ ** Using PNPM:**
39
35
``` bash
40
- json2ts --clipboard
36
+ pnpm add -g @typeweaver/json2ts
41
37
```
42
38
39
+ ---
40
+
41
+ ## 🛠️ Usage
42
+
43
43
### Programmatic API
44
+
44
45
Import and use the package in your Node.js or TypeScript project:
45
46
46
47
``` typescript
@@ -61,7 +62,7 @@ console.log(tsInterface);
61
62
62
63
## ✨ Example
63
64
64
- Input JSON:
65
+ ### Input JSON:
65
66
``` json
66
67
{
67
68
"name" : " John" ,
@@ -73,7 +74,7 @@ Input JSON:
73
74
}
74
75
```
75
76
76
- Generated TypeScript Interface:
77
+ ### Generated TypeScript Interface:
77
78
``` typescript
78
79
interface Root {
79
80
name: string ;
@@ -89,14 +90,14 @@ interface Root {
89
90
90
91
## 📚 Documentation
91
92
92
- For detailed documentation and examples, visit the [ project wiki] ( https://github.com/glincker/json-to-typescript/wiki ) .
93
+ For more details, advanced examples, and troubleshooting, check the [ project wiki] ( https://github.com/glincker/json-to-typescript/wiki ) .
93
94
94
95
---
95
96
96
97
## 🤝 Contributing
97
98
98
99
We welcome contributions!
99
- Please see the [ CONTRIBUTING.md] ( CONTRIBUTING.md ) file for guidelines.
100
+ If you want to enhance this project, please refer to the [ CONTRIBUTING.md] ( CONTRIBUTING.md ) file for guidelines.
100
101
101
102
---
102
103
@@ -109,10 +110,11 @@ This project is licensed under the [MIT License](LICENSE).
109
110
## 🌟 Acknowledgments
110
111
111
112
- Developed by [ Glincker] ( https://github.com/glincker ) .
112
- - Part of the ** TypeWeaver ** ecosystem.
113
+ - Part of the ** GLINR ** ecosystem.
113
114
114
115
---
115
116
116
117
## 📬 Feedback
117
118
118
- Have ideas or suggestions? Create an issue in the repository or join the discussion on [ GLINR Community] ( https://community.glinr.dev ) .
119
+ We’d love to hear from you!
120
+ Submit your ideas or suggestions via issues in the repository or join the discussion on the [ GLINR Community] ( https://community.glinr.dev ) .
0 commit comments