JSON can convert a set of data represented in a programming language object into a string. This string can then be easily passed over the network or between programs, and restored to the data format supported by each programming language when needed. , for example in PHP, you can restore JSON to an array or a basic object. When using AJAX, if you need to use an array to transfer values, you need to use JSON to convert the array into a string.