shakilsiraj / json-object-mapper

A TypeScript library to serialize and deserialize object graph from/to JSON in a fast and non-recursive way
MIT License
58 stars 18 forks source link

[Question/Feat Request]Mapping multiple JSON properties to one object property #39

Open Payetus opened 5 years ago

Payetus commented 5 years ago

Mapping multiple JSON properties to one object property

For example I have the following JSON object: obj = { id: '002', date: '05/07/1991', time:'22:35' And I want to map it to the following class : class Example { @JsonProperty() id = ''; datetime: Date = new Date(); } I want to concatenate date and time to datetime. Ho would I go about acomplishing this?