{"": "attachment-2","": "attachment-1"}
I am getting this JSON-encoded string (or an oher format… let me know) from parsing a mail and I can not change it. How can I decode it?
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.
This JSON response is invalid as @ThiefMaster mentioned, because JSON doesn’t support
duplicated keys.You should contact the service you’re trying to request this response from.
In case you have a valid JSON response you can decode it using the
json_decodefunctionwhich returns an
objector anarray(depends on the second parameter);For example: (Object)
Another option is to write your own decoder function.