What is JSON?
JSON.stringify() generates a minified JSON string by default, which takes up less space but is hard to read by humans. To generate a pretty JSON string, the third parameter of the JSON.stringify() method should be used. This parameter determines the number of spaces that should be placed within a JSON string when generating it. By default, padding and extra space for JSON objects are 0 bytes. It is useful when we need to transmit a JSON string over the network, and the data size is small. The third space is used exclusively for human-readable output.