{"action":"created","issue":{"url":"https://api.github.com/repos/nats-io/node-nats/issues/17","labels_url":"https://api.github.com/repos/nats-io/node-nats/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/nats-io/node-nats/issues/17/comments","events_url":"https://api.github.com/repos/nats-io/node-nats/issues/17/events","html_url":"https://github.com/nats-io/node-nats/issues/17","id":103898410,"number":17,"title":"JSON Parse Error","user":{"login":"ahallock","id":19376,"avatar_url":"https://avatars.githubusercontent.com/u/19376?v=3","gravatar_id":"","url":"https://api.github.com/users/ahallock","html_url":"https://github.com/ahallock","followers_url":"https://api.github.com/users/ahallock/followers","following_url":"https://api.github.com/users/ahallock/following{/other_user}","gists_url":"https://api.github.com/users/ahallock/gists{/gist_id}","starred_url":"https://api.github.com/users/ahallock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahallock/subscriptions","organizations_url":"https://api.github.com/users/ahallock/orgs","repos_url":"https://api.github.com/users/ahallock/repos","events_url":"https://api.github.com/users/ahallock/events{/privacy}","received_events_url":"https://api.github.com/users/ahallock/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-08-30T03:17:58Z","updated_at":"2015-08-30T15:23:19Z","closed_at":null,"body":"I have a JSON structure with a text field (which also happens to be JSON in this failure case), and intermittently receive a JSON parse error when parsing that field. I was able to reproduce (sometimes) using the following:\r\n\r\nhttps://gist.github.com/ahallock/38afc33f1f6d16064d5c\r\n\r\nVersions:\r\nnode-nats 0.4.0\r\nhttps://hub.docker.com/r/apcera/gnatsd/ (latest)\r\niojs 1.8.4\r\n\r\nWhen the parsing error occurs, the incoming message appears \"garbled\" with unknown characters:\r\n��&��I�,��!�f�1�7�|)�:�|))]&��)]\r\n\r\nI'll dig into this more as well (nats is awesome!)\r\n "},"comment":{"url":"https://api.github.com/repos/nats-io/node-nats/issues/comments/136153638","html_url":"https://github.com/nats-io/node-nats/issues/17#issuecomment-136153638","issue_url":"https://api.github.com/repos/nats-io/node-nats/issues/17","id":136153638,"user":{"login":"derekcollison","id":90097,"avatar_url":"https://avatars.githubusercontent.com/u/90097?v=3","gravatar_id":"","url":"https://api.github.com/users/derekcollison","html_url":"https://github.com/derekcollison","followers_url":"https://api.github.com/users/derekcollison/followers","following_url":"https://api.github.com/users/derekcollison/following{/other_user}","gists_url":"https://api.github.com/users/derekcollison/gists{/gist_id}","starred_url":"https://api.github.com/users/derekcollison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekcollison/subscriptions","organizations_url":"https://api.github.com/users/derekcollison/orgs","repos_url":"https://api.github.com/users/derekcollison/repos","events_url":"https://api.github.com/users/derekcollison/events{/privacy}","received_events_url":"https://api.github.com/users/derekcollison/received_events","type":"User","site_admin":false},"created_at":"2015-08-30T15:23:19Z","updated_at":"2015-08-30T15:23:19Z","body":"Unclear, but I will take a look. Thanks again for the heads up..\n\n\n\nOn Sun, Aug 30, 2015 at 8:15 AM, Andrew Hallock <notifications@github.com>\nwrote:\n\n> I tried using:\n> iojs 3.2\n> gnatsd 0.6.6\n> node-nats 0.4.2\n>\n> The problem persists, but appears to be less frequent. Could it be\n> something with the large number of \\ in the JSON string?\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/nats-io/node-nats/issues/17#issuecomment-136152954>.\n>\n"}}