JSON string specification?

in the data sent to me by the background today, a field returns

  MDN--JSON  there is no introduction here 

Jan.15,2022

I haven't seen such a lovely background developer for a long time


Let the backend give you {tags: {"area": "XXX", "industry": "XXX", "kind": "", "other": "XXX"}
or you JSON.parse ('{"area": "XXX", "industry": "XXX", "kind": "other": "XXX"})

in addition, "{" area ":" XXX "," industry ":" XXX "," kind ":"," other ":" XXX "}" what is the wrong syntax

?

'{"key": "value", "number": 1, "object": {"name": "this is my name"}} 'can be in this format, with numbers in double quotes or without


It is true that

does not specify the format of the JSON string. Json itself is just a string that facilitates data transmission.

your problem is simply a data format error, which belongs to a problem that you don't know about JSON.
and now that the back-end framework is so mature, shouldn't there be a ready-made api conversion? did your back-end classmate write a string to you manually?


the most basic.

  • key must be wrapped in double quotation marks.
  • the last object in the array must not be followed by , .
  • objects are wrapped with { } , and arrays are wrapped with [ ] .
  • other objects are basically the same as those in js.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eaa7a4-1fda.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eaa7a4-1fda.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?