Linked Questions
17 questions linked to/from Serializing an object to JSON
1236
votes
11
answers
933k
views
Serializing to JSON in jQuery [duplicate]
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
How to convert JS Object to JSON [duplicate]
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
Javascript - convert array to stringify format [duplicate]
I have this array:
array = [
{
"name": "name",
"value": "Olá"
},
{
"name": "age",
"...
-1
votes
1
answer
253
views
convert key value pair array to JSON [duplicate]
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
Browser-native JSON support (window.JSON)
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 ...
38
votes
5
answers
39k
views
Is there a quick way to convert a JavaScript object to valid JSON in the text editor?
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
How can I build a json string in javascript/jquery?
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
How do I create JSON in ExtJS for an AJAX call?
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
parsing JSON array gives error
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:
...
1
vote
1
answer
4k
views
print[ [object Object],[object Object]] to json array
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
How to convert arraylist of custom object in to json in javascript
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
JavaScript - converting object key value pairs to JSON
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
Json string parsing issue
var jsonString ="{ "
jsonString += "name:" + Data.name+",";
jsonString += "surname:"+ Data.surname+",";
jsonString += "Address: " + Data.add;
jsonString ...
0
votes
2
answers
70
views
How to simplfy the passing of parameter
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
How to convert a javascript object to json [closed]
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 ...