If you return null after json_decode, have you written the string like this"{ 'bar': 'baz' }", this can be parsed into JSON normally in JS, but it must be written as ' in PHP { "bar": "baz" }', attributes and values must be in double quotes
Use json_decode(), the premise is that the json format attributes and values must use double quotes. If you use python, you don’t need to use double quotes
The results are
If you return null after json_decode, have you written the string like this
"{ 'bar': 'baz' }"
, this can be parsed into JSON normally in JS, but it must be written as' in PHP { "bar": "baz" }'
, attributes and values must be in double quotesUse json_decode(), the premise is that the json format attributes and values must use double quotes. If you use python, you don’t need to use double quotes