Objeto a JSON JavaScript
var person={"first_name":"Tony","last_name":"Hawk","age":31};
var personJSONString=JSON.stringify(person);
Grepper
var person={"first_name":"Tony","last_name":"Hawk","age":31};
var personJSONString=JSON.stringify(person);
JSON.stringify(jsonobj,null,'\t')
var str = JSON.stringify(obj, null, 2); // spacing level = 2
JSON.stringify(obj, null, 2);