When you save some data using JSON.stringify() and then need to read that in php. The following code worked for me.

json_decode( html_entity_decode( stripslashes ($jsonString ) ) );

Thanks to @Thisguyhastwothumbs

Answer from S. A. Malik on Stack Overflow
🌐
W3Schools
w3schools.com › js › js_json_php.asp
JSON PHP
Before you send the request to the server, convert the JSON object into a string and send it as a parameter to the url of the PHP page: Use JSON.stringify() to convert the JavaScript object into JSON:
🌐
W3Schools
w3schools.com › js › js_json_stringify.asp
JSON.stringify()
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP, Bootstrap, Java, XML and more.
🌐
GitHub
gist.github.com › merin83 › c0460e90335a8d91ce4894bd0776a8d2
Decode JSON.stringify(object) in php · GitHub
Decode JSON.stringify(object) in php. GitHub Gist: instantly share code, notes, and snippets.
🌐
Alessio Puppi's Blog
alessiopuppi.blog › home › home › json › json in javascript & php: parse and stringify json
JSON in JavaScript & PHP: Parse and Stringify JSON
May 26, 2024 - Learn how to efficiently parse and stringify JSON in JavaScript & PHP. Understand built-in functions, use cases, and best practices for web development.
Find elsewhere
🌐
Jonathan Suh
jonsuh.com › blog › convert-loop-through-json-php-javascript-arrays-objects
Convert and Loop through JSON with PHP and JavaScript Arrays/Objects — Jonathan Suh
Like JSON.parse, JSON.stringify ... JSON.stringify as well. You can combine the methods above to create powerful, dynamic implementations on your website or application. Let’s say you want to get information from a database, safely return the data as JSON, and loop through it dynamically, you can do so with a bit of PHP and JavaScript ...
🌐
Envato Tuts+
code.tutsplus.com › home › cloud & hosting
How to Parse JSON in PHP | Envato Tuts+
May 31, 2021 - In this tutorial, you learned how to read JSON data from a file or string in PHP. You also learned how to convert that JSON into an array and traverse it to extract the information you want.
🌐
GeeksforGeeks
geeksforgeeks.org › php › how-to-convert-a-string-to-json-object-in-php
How to Convert a String to JSON Object in PHP ? - GeeksforGeeks
July 23, 2025 - Given a String, the task is to convert the given string into a JSON object in PHP. JSON (JavaScript Object Notation) is a widely used data interchange format.
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-json-php
Javascript | JSON PHP - GeeksforGeeks
February 10, 2023 - After doing all this in php and the html file this will be appear as follows: ... <!DOCTYPE html> <html> <body> <h1 style = "color:#090; text-align:center;">GeeksforGeeks</h1> <p style="font-size:25px">geeks table values:</p> <p id="arrayContent"></p> <script> var obj, xmlhttp, myObj, x, txt = ""; obj = JSON.stringify({"table":"geeks"}); xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { myObj = JSON.parse(this.responseText); for (x in myObj) { txt += myObj[x].names + "<br>"; } document.getElementById("arrayContent").innerHTML = txt; } }; xmlhttp.open("POST", "post.php", true); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.send("x=" + obj ); </script> </body> </html>
🌐
PHP
php.net › manual › en › function.json-encode.php
PHP: json_encode - Manual
If a value to be serialized is an object, then by default only publicly visible properties will be included. Alternatively, a class may implement JsonSerializable to control how its values are serialized to JSON.
🌐
4D
developer.4d.com › 4d language › commands by theme › json › json stringify
JSON Stringify | 4D Docs
var $MyTestVar : Object var $name ;$jsonstring : Text OB SET($MyTestVar;"name";->$name) // object definition // $MyTestVar= {"name":"->$name"} $jsonstring :=JSON Stringify($MyTestVar) // $jsonstring ="{"name":""}" //... $name:="Smith" $jsonstring :=JSON Stringify($MyTestVar) //$jsonstring = "{"name" : "Smith"}"
🌐
Scout APM
scoutapm.com › blog › php-json-encode-serialize-php-objects-to-json
PHP Json_encode: Serialize PHP Objects to JSON
In this post, we’ll learn about the JSON format, about the json_encode() function - what it is, why it is required, and how it can be used to convert PHP data structures into JSON format, all with examples. In the end, we’ll also see how we can decode JSON data to be able to process it.