Beginners ask a few questions about json objects

Why use json object strings here, as shown in the figure? Then the front-end js parses the string into an object with JSON.parse (), so why not just use the normal js object form in the first place?


data transmission is generally in the form of strings


front and rear are different languages, and they all support the processing of data in json format. That's why it is used in this way, which is more convenient for data transmission and processing between different languages.


this backend obviously does not know how to use the json_encode function. However, after json_encode, there is indeed a string
. Just take a look at the http protocol. The data is transferred using the string

.
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-1e445eb-442ec.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-1e445eb-442ec.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?