It's a way of cloning an object, so that you get a complete copy that is unique but has the same properties as the cloned object.

var defaultParams = { a : 'b' };
var params = JSON.parse(JSON.stringify(defaultParams));

console.log( params.a ); // b
console.log( defaultParams.a ); // b
console.log( params === defaultParams ); // false

The above outputs false because even though both objects have the a property, with the value b, there are different objects that are independent of each other (they don't refer to the same reference).

The JSON method will only work with basic properties - no functions or methods.

Answer from MrCode on Stack Overflow
🌐
Medium
medium.com › @pmzubar › why-json-parse-json-stringify-is-a-bad-practice-to-clone-an-object-in-javascript-b28ac5e36521
Why use JSON “parse” and “stringify” methods a bad practice to clone objects in JavaScript (2023 update) | by Petro Zubar | Medium
October 10, 2023 - As you can see, you can just lose data of unsupported types when copying your object in such a way. Moreover, JavaScript won`t even warn you about that, because calling JSON.stringify() with such data types does not throw any error.
🌐
Joe Attardi
joeattardi.dev › customizing-jsonparse-and-jsonstringify
Customizing `JSON.parse` and `JSON.stringify`
February 15, 2025 - When we call JSON.stringify our toJSON function is called, and the return value is used for stringification.
🌐
DEV Community
dev.to › benlesh › bigint-and-json-stringify-json-parse-2m8p
BigInt and JSON.stringify/JSON.parse - DEV Community
January 5, 2021 - Interesting post, thanks, and it'd be great to have a common convention for all native constructors that can't be serialized, and these two helpers should already work for most cases (missing recursive parse/stringify for special cases such as Map or Set). const serialize = value => `${ value.constructor.name }(${ (typeof value === 'object' && ( ('length' in value) || ('size' in value)) ) ? `[${[...value].map(v => JSON.stringify(v))}]` : value })`; const unserialize = value => { const i = value.indexOf('('); const args = value.slice(i + 1, -1); const constructor = self[value.slice(0, i)]; switch (constructor.name) { case 'BigInt': return constructor(args); default: return new constructor(JSON.parse(args)); } };
🌐
Built In
builtin.com › software-engineering-perspectives › json-stringify
How to Use JSON.stringify() and JSON.parse() in JavaScript | Built In
Summary: JSON.stringify() converts a JavaScript object into a JSON string, and JSON.parse() reverses the process. These methods are often used together to handle JSON data, but they don’t support certain types like undefined, Infinity, NaN, ...
🌐
W3Schools
w3schools.com › js › js_json_parse.asp
JSON.parse()
A common use of JSON is to exchange data to/from a web server. When receiving data from a web server, the data is always a string. Parse the data with JSON.parse(), and the data becomes a JavaScript object.
Find elsewhere
🌐
Zhenghao
zhenghao.io › posts › json-oddities
JSON and the stringification oddities in JavaScript
In JavaScript, the way to convert a value to a JSON string is via JSON.stringify.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › JSON › parse
JSON.parse() - JavaScript | MDN
JSON.parse( '{"p": 5}', (key, value) => typeof value === "number" ? value * 2 // return value * 2 for numbers : value, // return everything else unchanged ); // { p: 10 } JSON.parse('{"1": 1, "2": 2, "3": {"4": 4, "5": {"6": 6}}}', (key, value) => { console.log(key); return value; }); // 1 // 2 // 4 // 6 // 5 // 3 // "" In order for a value to properly round-trip (that is, it gets deserialized to the same original object), the serialization process must preserve the type information. For example, you can use the replacer parameter of JSON.stringify() for this purpose:
🌐
npm
npmjs.com › package › fast-json-stringify
fast-json-stringify - npm
1 month ago - Stringify your JSON at max speed. Latest version: 6.3.0, last published: a month ago. Start using fast-json-stringify in your project by running `npm i fast-json-stringify`. There are 202 other projects in the npm registry using fast-json-stringify.
      » npm install fast-json-stringify
    
Published   Feb 06, 2026
Version   6.3.0
Author   Matteo Collina
🌐
Attacomsian
attacomsian.com › blog › json-parse-stringify
Understanding JSON.parse() and JSON.stringify()
October 3, 2022 - The JSON.parse() method takes a string as input and transforms it into an object. Similarly, JSON.stringify() takes a JSON object and converts it into a string.
🌐
Reddit
reddit.com › r/developersindia › alternative of json.parse(json.stringify(data)) as its a synchronous function
r/developersIndia on Reddit: Alternative of JSON.parse(JSON.stringify(data)) as its a synchronous function
December 21, 2023 -

https://www.linkedin.com/posts/arunm-engineer_one-line-caused-the-entire-company-10x-down-activity-7178235801720303616-2f3p?utm_source=share&utm_medium=member_ios

If this is actually an issue, whats a better alternative? Will doing async await work?

🌐
DigitalOcean
digitalocean.com › community › tutorials › js-json-parse-stringify
How To Use JSON.parse() and JSON.stringify() | DigitalOcean
November 24, 2021 - JSON.stringify() can take two additional arguments. The first one is a replacer function.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › JSON › stringify
JSON.stringify() - JavaScript | MDN
The JSON.stringify() static method converts a JavaScript value to a JSON string, optionally replacing values if a replacer function is specified or optionally including only the specified properties if a replacer array is specified.
🌐
Python
docs.python.org › 3 › library › json.html
json — JSON encoder and decoder
2 weeks ago - JSONDecodeError – When the data being deserialized is not a valid JSON document. UnicodeDecodeError – When the data being deserialized does not contain UTF-8, UTF-16 or UTF-32 encoded data. ... Added the optional object_pairs_hook parameter. parse_constant doesn’t get called on ‘null’, ‘true’, ‘false’ anymore.
🌐
Json Parser Online
json.parser.online.fr
Json Parser Online
Analyze your JSON string as you type with an online Javascript parser, featuring tree view and syntax highlighting. Processing is done locally: no data send to server.
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › what-is-difference-between-json-parse-and-json-stringify-methods-in-javascript
What is difference between JSON.parse() and ...
July 23, 2025 - JSON.parse() converts JSON strings to JavaScript objects, while JSON.stringify() converts JavaScript objects to JSON strings. JavaScript utilizes JSON for data interchange between servers and web pages.
🌐
W3Schools
w3schools.com › js › js_json_stringify.asp
JSON.stringify()
You can convert any JavaScript datatype into a string with JSON.stringify().
🌐
V8
v8.dev › blog › json-stringify
How we made JSON.stringify more than twice as fast · V8
At the end, the final result is constructed by simply concatenating the output from the initial one-byte stringifier with the output from the two-byte one. This strategy ensures we stay on a highly-optimized path for the common case, while the transition to handling two-byte characters is lightweight and efficient. Any string in JavaScript can contain characters that require escaping when serializing to JSON (e.g.
🌐
JSON Formatter
jsonformatter.org › json-stringify-online
JSON Stringify Online using JSON.Stringify()
JSON Stringify Online helps convert string value to JSON String using JSON.Stringify().