{"action":"created","issue":{"url":"https://api.github.com/repos/paypal/PayPal-PHP-SDK/issues/541","repository_url":"https://api.github.com/repos/paypal/PayPal-PHP-SDK","labels_url":"https://api.github.com/repos/paypal/PayPal-PHP-SDK/issues/541/labels{/name}","comments_url":"https://api.github.com/repos/paypal/PayPal-PHP-SDK/issues/541/comments","events_url":"https://api.github.com/repos/paypal/PayPal-PHP-SDK/issues/541/events","html_url":"https://github.com/paypal/PayPal-PHP-SDK/issues/541","id":146329221,"number":541,"title":"Incorrect JSON data","user":{"login":"fredeastside","id":988457,"avatar_url":"https://avatars.githubusercontent.com/u/988457?v=3","gravatar_id":"","url":"https://api.github.com/users/fredeastside","html_url":"https://github.com/fredeastside","followers_url":"https://api.github.com/users/fredeastside/followers","following_url":"https://api.github.com/users/fredeastside/following{/other_user}","gists_url":"https://api.github.com/users/fredeastside/gists{/gist_id}","starred_url":"https://api.github.com/users/fredeastside/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredeastside/subscriptions","organizations_url":"https://api.github.com/users/fredeastside/orgs","repos_url":"https://api.github.com/users/fredeastside/repos","events_url":"https://api.github.com/users/fredeastside/events{/privacy}","received_events_url":"https://api.github.com/users/fredeastside/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/paypal/PayPal-PHP-SDK/labels/question","name":"question","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-06T14:20:54Z","updated_at":"2016-04-06T15:50:43Z","closed_at":null,"body":"Hi,\r\nin log file I get response with this incorrect json data (It contains \"on\" and \"\\n\"), for example :\r\n```\r\n[06-04-2016 05:08:16] PayPal\\Core\\PayPalHttpConnection: DEBUG\t: Response Data \t: on\r\n\r\n{\"id\":\"PAY-59F93447LJ941144TK4CRQVA\",\"intent\":\"sale\",\"state\":\"created\",\"payer\":{\"payment_method\":\"paypal\"},\"transactions\":[{\"amount\":{\"total\":\"15800.00\",\"currency\":\"RUB\",\"details\":{\"subtotal\":\"15800.00\",\"shipping\":\"0.00\"}},\"description\":\"Payment description\",\"invoice_number\":\"889\",\"item_list\":{\"items\":[{\"name\":\"510&#8482; Skinny Fit Jeans\",\"sku\":\"0\",\"price\":\"7900.00\",\"currency\":\"RUB\",\"quantity\":1},{\"name\":\"Джинсы 721 High Rise Skinny\",\"sku\":\"1\",\"price\":\"7900.00\",\"currency\":\"RUB\",\"quantity\":1},{\"name\":\"Discount\",\"sku\":\"2\",\"price\":\"0.00\",\"currency\":\"RUB\",\"quantity\":1}]},\"related_resources\":[]}],\"create_time\":\"2016-04-06T14:08:20Z\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-59F93447LJ941144TK4CRQVA\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-4MJ33818AV584483B\",\"rel\":\"approval_url\",\"method\":\"REDIRECT\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-59F93447LJ941144TK4CRQVA/execute\",\"rel\":\"execute\",\"method\":\"POST\"}]}\r\n```\r\n\r\nIn file \"rest-api-sdk-php/lib/PayPal/Common/PayPalModel.php\"\r\nline 266\r\nmethod\r\n```\r\npublic function fromJson($json)\r\n    {\r\n        return $this->fromArray(json_decode($json, true));\r\n    }\r\n```\r\n\r\nHere json_decode return false,\r\nand json_last_error return JSON_ERROR_SYNTAX"},"comment":{"url":"https://api.github.com/repos/paypal/PayPal-PHP-SDK/issues/comments/206438485","html_url":"https://github.com/paypal/PayPal-PHP-SDK/issues/541#issuecomment-206438485","issue_url":"https://api.github.com/repos/paypal/PayPal-PHP-SDK/issues/541","id":206438485,"user":{"login":"ppmtscory","id":6306449,"avatar_url":"https://avatars.githubusercontent.com/u/6306449?v=3","gravatar_id":"","url":"https://api.github.com/users/ppmtscory","html_url":"https://github.com/ppmtscory","followers_url":"https://api.github.com/users/ppmtscory/followers","following_url":"https://api.github.com/users/ppmtscory/following{/other_user}","gists_url":"https://api.github.com/users/ppmtscory/gists{/gist_id}","starred_url":"https://api.github.com/users/ppmtscory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppmtscory/subscriptions","organizations_url":"https://api.github.com/users/ppmtscory/orgs","repos_url":"https://api.github.com/users/ppmtscory/repos","events_url":"https://api.github.com/users/ppmtscory/events{/privacy}","received_events_url":"https://api.github.com/users/ppmtscory/received_events","type":"User","site_admin":false},"created_at":"2016-04-06T15:50:43Z","updated_at":"2016-04-06T15:50:43Z","body":"Is this from a create payment call?  Let me know which call you are doing so that I can try to replicate to see what may be happening."}}