Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well, you could process the JSON on client side.

    response.comments.forEach(comment =>  comment.author = response.user[comment.author]);
Preferably, even, you could do it during rendering so it can be garbage collected afterwards.


Well, that counts as further deserialisation in my book. At least if you set up a convention to automate it for all kinds of objects. Otherwise you'd have to do it manually for every type of request




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: