JSON.parse() and JSON.stringify() look simple. You call one to get data in, call the other to get it out. But both have second and third arguments that most developers never touch — and those arguments unlock features that would otherwise require custom code. Here are seven things worth knowing. 1. JSON.stringify() has a space argument Everyone knows the first argument. Most people have no idea about the third: const data = { name : " Alice " , age : 30 , tags : [ " admin " , " editor " ] }; // Default — minified JSON . stringify ( data ); // '{"name":"Alice","age":30,"tags":["admin","editor"]}' // Indented with 2 spaces JSON . stringify ( data , null , 2 ); // { // "name": "Alice", // "age": 30, // "tags": [ // "admin", // "editor" // ] // } // Indented with a tab character JSON . stringify ( data , null , ' \t ' ); Enter fullscreen mode Exit fullscreen mode The space argument accepts either a number (number of spaces) or a string (used as the indent).…