JSON a TypeScript
Genera interfaces TypeScript a partir de JSON
Entrada
Salida
Las interfaces TypeScript aparecerán aquí...
Ejemplos
| Tipo | JSON | Aplicar |
|---|---|---|
| Object | {"id":1,"name":"Ann","tags":["a","b"],"address":{"city":"Kraków","zip":"30-001"}} | |
| Optional | {"users":[{"id":1,"email":"[email protected]","admin":true},{"id":2,"email":"[email protected]"}]} | |
| Array | [{"sku":"A1","price":9.99},{"sku":"B2","price":12,"discount":0.1}] | |
| Name clash | {"a":{"x":1},"b":{"a":{"y":2}},"c":{"a":{"z":3}}} | |
| Union | {"id":[1,"two"],"tags":[],"score":[1,1.5],"note":null} | |
| Odd keys | {"first-name":"Ann","2nd":"Bob","user id":7,"ok":true} |