Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!border1.nntp.dca1.giganews.com!Xl.tags.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!local2.nntp.dca.giganews.com!nntp.posted.grandecom!news.posted.grandecom.POSTED!not-for-mail NNTP-Posting-Date: Tue, 06 Jan 2015 18:17:12 -0600 User-Agent: Microsoft-Entourage/12.23.0.091001 Date: Tue, 06 Jan 2015 18:17:12 -0600 Subject: Help with JSON.parse From: Bint Newsgroups: comp.lang.javascript Message-ID: Thread-Topic: Help with JSON.parse Thread-Index: AdAqD0hSUzLp70KkvEaLl8yjwId0sw== Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Lines: 26 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 216.82.212.181 X-Trace: sv3-S5nPrRri25o8zna//ykwXsiLMGYzg6if0ZzV9UC3+y6zpRV/oSl1c+sJ34e3kmKwkZKEkY8+pQACqcr!h6Mh1Fon6XOx51PriFARwjQl/Jcauk4EmjLIcqH38IqXM8owfXpWUEnpfUJC0Yg= X-Complaints-To: abuse@grandecom.com X-DMCA-Complaints-To: abuse@grandecom.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1968 Xref: csiph.com comp.lang.javascript:26473 Hello, I don't have a whole lot of experience with JSON. I am trying to return a two-dimensional array from PHP to Javascript. The array contains some strings, however, which seem to screw up the JSON parsing. The strings contain parenthesis which I guess JSON uses. But shouldn't the JSON_encode call take care of that? I'm confusing. So I have an array. Here are two entries, where each entry has three sub-strings. "(Jan 7, 2015 0:42AM)","2015-01-06 15:43:00","this is string 1." "(Jan 7, 2015 0:42AM)","2015-01-06 15:42:26","this is string 2" I json_encode that from PHP. But when I use JSON.Parse back in Javascript, I get an error: SyntaxError: JSON Parse error: Unexpected token '(' Anyone know what I need to do to fix it? Do I need to further encode those strings with parenthesis before sticking them in the array for JSON to encode? Thanks!