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 :: get id of an element 
Javascript :: use setstate in function component 
Javascript :: react webpack.config.js 
Javascript :: use get_json in jstree example 
Javascript :: jshint ignore 
Javascript :: moment timezone set clock in another timezone 
Javascript :: this element in javascript 
Javascript :: npm run build npm ERR! Missing script: "build" for firebase 
Javascript :: useeffect react example 
Javascript :: Node Sass version 7.0.0 is incompatible with ^4.0.0 
Javascript :: jquery wait for function to finish 
Javascript :: math random js 
Javascript :: using fetch api 
Javascript :: change focus to next field jquery after enter 
Javascript :: how to delete an element of an array in javascript 
Javascript :: filter duplicates javascript 
Javascript :: django ajax body to json 
Javascript :: regex to check 8 < length < 16, one uppercase, one lowercase and must have at least one number and one special character 
Javascript :: disable button js 
Javascript :: how to check if the first letter of a string is capitalized or uppercase in js 
Javascript :: lodash remove multiple items from array 
Javascript :: node -r dotenv/config 
Javascript :: javascript url pas array 
Javascript :: includes method javascript 
Javascript :: Multiple children were passed to <Link with `href` of `/escritorio/opcion1` but only one child is supported 
Javascript :: js refresh 
Javascript :: Print array of objects js 
Javascript :: passport local mongoose 
Javascript :: array.from js 
Javascript :: useref material ui 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =