i have a the following Interface
interface MyObj {
myString: string;
myNumber: string;
myDate: Date;
}
this.http.get<MyObj>(this.getObjectsURL);
Result:
{ "myString": "test", "myNumber": 12, "myDate": "2011-10-05T14:48:00.000Z"}
If i get the data, the field myDate is a string and not a Date.
If i transform MyObj to a JSON and parse it again, i get a Date-String too, and not the correct Type. Thats very bad :-( Is it possible to parse typesafe ( for HTTP requests and Json Transform, too?) with transformation to the right data-types?
Thanks :-)