-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deserialize arrays #12
Comments
You could try something like this.authHttp.get('/items')
.map(response => response.json().map(item => deserialize(Item, item)))
.catch(this.handleError)
.subscribe(data => console.log(data)); |
@Geschan for now the first parameter of the deserialize method accept object. I will consider your case and add this feature soon. |
+1 for deserializing arrays |
Was there a working solution for deserializing arrays, the solution @WilliamChelman provided produced an error "json is not a function" |
@rreid116 The let myArray = [...];
let myMappedArray = myArray.map(obj => deserialize(MyClass, obj)) |
+1 for deserialize array |
Any update on this issue? |
I tried to deserialize an array of items like this:
But the compiler didn't like it. How can I fix this?
The text was updated successfully, but these errors were encountered: