json2typescript icon indicating copy to clipboard operation
json2typescript copied to clipboard

Map JSON to a TypeScript class with secure type checking!

Results 40 json2typescript issues
Sort by recently updated
recently updated
newest added

After reading your documentation, I understand that the @JsonObject decorator now requires the class identifier as the first parameter. However, one of my dependencies for my project also uses to...

I have this class that looks something like this: ``` @JsonObject export class UserPublicProfile implements RefBalrogModel { @JsonProperty('timestamp', TimestampConverter) timestamp: Timestamp = new Timestamp(); @JsonProperty('user_name', String) user_name: string = undefined;...

question

I encountered some use cases where partial serialization would have been useful. For example, I get a User instance from the server and deserialize it. Then, a user updates some...

enhancement

I noticed that if we set `ignorePrimitiveChecks = true`, then all `undefined` properties are ignored as well. Example: JSON: ``` { "testt": "Hello World" } ``` TYPESCRIPT: ``` class Test...

question

When I define an own CustomConverter (example: DateConverter), I can define it to throw errors. The error message is a bit confusing. The expected type is listed as `undefined` while...

invalid

As of now, handling of null/undefined values are dependent on the property settings (mainly isOptional) and global settings. We should improve the way it handles that. As discussed in https://github.com/appvision-gmbh/json2typescript/pull/138,...

enhancement

I would like to convert a string to an enum type. lets say i have a enum. enum Test{ YES="1", NO="0" } and when i get {"value":"1"} from server i...

enhancement

Hey guys, So the reason for this request is as follows. Picture you have a class that has a few properties, you have to serialise and de-serialise when doing server...

enhancement

Hi, will it be possible to add serialize/deserialize methods that return Promises? Our use case here is we are loading types from a server call and need to await the...

enhancement