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