Black Lives Matter! ✊🏾

JSON.stringify()

The stringify function returns a String in UTF-16 encoded JSON format representing an ECMAScript value, or undefined. 24.5.2JSON.stringify

Links about JSON.stringify()

  1. TIL — The power of JSON.stringify replacer parameter | pawelgrzybek.com

    posted on by Pawel Grzybek - https://pawelgrzybek.com/

    I had a challenging problem with JSON stringify that ignored my data in a place where I expected sets of values. Luckily I managed to solve it in a very elegant way.

  2. JSON.stringify()

    posted on by MDN

    The JSON.stringify() method converts a JavaScript object or 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.

Code sample

JSON.stringify({ x: 5, y: 6 })