I'm getting null when I decode my Json. $contactInfo is a String from Java(Android) pushed via Volley. I did check the string, it is a string.
I have tried the following
1) Make the $contactInfo with one user's contact only
2) Removed spaces
3) Remove special characters like ♡
4) Remove +
The closest solution I can find to reading such [[data,data],[data,data]] is to use json decode. Is there any other way for me to read this into a array or json?
$contactInfo = "[[john qiu, +16266169643], [Vince, +65 5888 8447]]"
$obj = stripslashes($contactInfo);
$obj = json_decode($obj);
echo json_last_error();
echo is returning JSON_ERROR_SYNTAX
contactInfo, for some users , there are special characters like "♡"
$data, the error is pretty self-explanatory. It isn't valid JSON syntax.[[john qiu, +1626643]]isn't valid JSON if that's what you are referring to.[[john qiu, +1626643]]is not a valid JSON{[john qiu, +1626643]}should be. Can u dump the whole string you are getting returned, and tell us if the form is always the same, maybe we can figure out a function to decode it.