You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Express
If I pass an array to res.json() then it is not available to client.
res.json([{"name":"tt"},{"name":"gg"}]);
it given only {"name":"tt"} to client.
while on using json object, it is available correctly.
res.json({"obj":[{"name":"tt"},{"name":"gg"}]});
Is this a bug ? or anything workaround can be done for this,
Ryan Schmidt
unread,
Mar 23, 2012, 8:57:52 PM3/23/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to expre...@googlegroups.com
JSON stands for "JavaScript Object Notation", so it seems logical to me that you would need to pass res.json() a JavaScript object -- not an array, not a string, not an integer, not any other type.
Lothar Pfeiler
unread,
Mar 24, 2012, 11:59:46 AM3/24/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Express
I don't think its a JSON problem. In JS an array is an object, too,
isn't it? Also, JSON.stringify() could deal with this example. I
haven't looked at res.json yet. Looks like I could use this function,
too. Is there a dependency to 'Content-Type'?
tjholowaychuk
unread,
Mar 24, 2012, 2:14:08 PM3/24/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message