Writing JSON object to .json file on server
You are double-encoding. There is no need to encode in JS and PHP, just do it on one side, and just do it once. // step 1: build data structure var data = { metros: graph.getVerticies(), routes: graph.getEdges() } // step 2: convert data structure to JSON $.ajax({ type : “POST”, url : “json.php”, data … Read more