My string like this:
{
"key": "value’s",
"key2": "value"
}
I use json_decode() PHP 5 and class Services_Json for PHP 4 and get nothing when contain “’“.
What is solution?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Most likely your input string isn’t properly utf-8 encoded.
http://docs.php.net/json_decode says:
And when I feed it your string utf-8 encoded (i.e. when ’ is encoded as the three-byte-sequence
E2 80 99instead of92in latin1) the result is(using php 5.3.3/winxp)