Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 326 Bytes

toJSONString.md

File metadata and controls

12 lines (8 loc) · 326 Bytes

Object.prototype.toJSONString()

Equivalent to JSON.stringify.

Converts Object to JSON standard string and returns.

let obj = {foo:"bar"};
let jsonString = obj.toJSONString();

console.log(jsonString); // '{"foo":"bar"}'