Why use eval to convert JSON into an object in Chapter 2?
Closed this issue · 2 comments
F21 commented
eval
is used to parse the JSON in chapter 2: https://github.com/matryer/goblueprints/blob/master/chapter2/chat/templates/chat.html#L51
Wouldn't JSON.parse(e.data)
be a better choice?
matryer commented
Yes it would :)
On 25 Nov 2015, at 22:42, Francis Chuang notifications@github.com wrote:
eval is used to parse the JSON in chapter 2: https://github.com/matryer/goblueprints/blob/master/chapter2/chat/templates/chat.html#L51
Wouldn't JSON.parse(e.data) be a better choice?
—
Reply to this email directly or view it on GitHub.