Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

json stringify double quotes

var data = {
	name: "himanshu",
    github: "himanshurajora"
}
var strData = JSON.stringify(data)

// json stringify by default gives us double quotes
// you can setup the same format as json itself

var strData = JSON.stringify(data, null, 4)
Comment

json stringify without quotes

Use JSON5.stringify
JSON5 is a superset of JSON that allows ES5 syntax, including unquoted property keys. The JSON5 reference implementation (json5 npm package) provides a JSON5 object that has the same methods with the same args and semantics as the built-in JSON object.

It is highly likely that the service you are using is using this library.
Comment

PREVIOUS NEXT
Code Example
Javascript :: js new function 
Javascript :: invalid json response body 
Javascript :: connect react to backend 
Javascript :: js DFS 
Javascript :: class in js 
Javascript :: comment field react 
Javascript :: implement the nationalize api using async/await with fetch. 
Javascript :: button prevent default 
Javascript :: prevent page scrolling when a modal is open 
Javascript :: javascript json to excel 
Javascript :: = meaning in javascript 
Javascript :: javascript timer countdown with seconds 59 
Javascript :: Run FEnvQueryRequest 
Javascript :: vscode module path aliases 
Javascript :: javascript prevent more than one click 
Javascript :: merge sort 
Javascript :: javascript Symbol Properties 
Javascript :: javascript typeof operator returns function 
Javascript :: electron webcontent send data into react not working 
Javascript :: find the missing number javascript 
Javascript :: code grepper temp email number and password 
Javascript :: Create & Download PDF from Byte[] Array using jQuery AJAX 
Javascript :: maximum product of word lengths leetcode solution 
Javascript :: regex to allow special characters 
Javascript :: complex expression in programming 
Javascript :: white for file loaded 
Javascript :: store reference of event listener inside a element 
Javascript :: js replay animation 
Javascript :: how to declare a variable js 
Javascript :: module.exports equivalent typescript 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =