Linked Questions

17 questions linked to/from Serializing an object to JSON
1236 votes
11 answers
933k views

I need to serialize an object to JSON. I'm using jQuery. Is there a "standard" way to do this? My specific situation: I have an array defined as shown below: var countries = new Array(); countries[0]...
1 vote
2 answers
40k views

Is it posible to convert a js object to json or is a js object exactly a JSON ? Can someone tell me what a JSON exactly is ?
0 votes
1 answer
501 views

I have this array: array = [ { "name": "name", "value": "Olá" }, { "name": "age", "...
-1 votes
1 answer
253 views

i have a function that scans a directory and builds a key,value pair of all folders and their respective files in it. const listNotes = () => { const listing = []; try{ const folders ...
95 votes
5 answers
72k views

I have seen references to some browsers natively supporting JSON parsing/serialization of objects safely and efficiently via the window.JSON Object, but details are hard to come by. Can anyone point ...
levik's user avatar
  • 118k
38 votes
5 answers
39k views

I have a big old config object. Something like: var object = { item1: 'value1', item2: 1000, item3: ['a', 'b', 'c'], item4: [1, 2, 3], item5: { foo: 'bar' } }; ... and so on. I want ...
25 votes
2 answers
59k views

I want to build a JSON string programmatically. The end product should be something like this: var myParamsJson = {first_name: "Bob", last_name: "Smith" }; However, I would like ...
1 vote
3 answers
10k views

I want to create this parameter file so that I can send it to my web service. var parms = { "quiz_id":"120", "owner_id":"1", "solver_id":"1", "answers": [ { "answer_text" : "YES"...
0 votes
2 answers
9k views

I have the following Javascript object: var o = { "username":"username", "args": [ "1", "2", "3" ] }; And send it like: xhr.send(JSON.stringify(o)); My java class: ...
uylmz's user avatar
  • 1,580
1 vote
1 answer
4k views

I want to print [object Object],[object Object] to like wise "[[{ 'x': '1', 'y': '0' }, { 'x': '2', 'y': '1' }]]"; How it is possible in javascript
Psl's user avatar
  • 3,948
0 votes
2 answers
5k views

I have a (java.util.List) List returned to the jag. That should be printed as a json . var storeForum = Packages.org.wso2.carbon.forum.registry.RegistryForumManager; var forum = new storeForum(...
1 vote
1 answer
4k views

I have a javascript object with 6 key value pairs: My_Type_1:"Vegetable" My_Type_2:"Fruit" My_Type_3:"Dessert" My_Value_1: "Carrot" My_Value_2: "Apple" My_Value_3: "Cake" I want to construct JSON ...
Jake's user avatar
  • 26.2k
0 votes
4 answers
107 views

var jsonString ="{ " jsonString += "name:" + Data.name+","; jsonString += "surname:"+ Data.surname+","; jsonString += "Address: " + Data.add; jsonString ...
iRunner's user avatar
  • 1,522
0 votes
2 answers
70 views

I have these method in c# which requires 3 parameters public void Delete_AgentTools(int ID,int UAM,int mode) { some code etc. } and I use javascript ajax to call this method and pass ...
0 votes
3 answers
99 views

I'm trying to convert a JavaScript object to a json. Practically I have created a website where you can upload a json, edit it and download it with your changes. For convenience when I edit it ...
Mister98's user avatar

15 30 50 per page
1
2