Dear all,
I have decided to develop a native iPhone apps as a compliment to our webapps. Now I am wondering what are my options to send data remotely from the iPhone apps - since the database is online - to our online database. What I can think of on top of my head - since I come from web dev background - is JSON. My webapps is built us...
Any example on the net ?
...
I have a class which contains a list of items.
I want to serialize an instance of this class to json using the DataContractJsonSerializer as a json array. eg.
class MyClass
{
List<MyItem> _items;
}
class MyItem
{
public string Name {get;set;}
public string Description {get;set;}
}
When serialized to json it should be like...
I've had to use $.ajaxSetup() to globally change the contentType to application/json
$.ajaxSetup({
contentType: "application/json; charset=utf-8"
});
(See this question for why I had to use application/json http://stackoverflow.com/questions/2792603/aspnet-mvc-why-is-modelstate-isvalid-false-the-x-field-is-required-when-that)
But t...
I have an HttpResponse object for a web request I just made. The response is in the JSON format, so I need to parse it. I can do it in an absurdly complex way, but it seems like there must be a better way.
Is this really the best I can do?
HttpResponse response; // some response object
Reader in = new BufferedReader(
n...
I have a webservice that I want to call from the browser every few seconds to see if there are any notification messages in the database that should be displayed on the screen. We have the JSON code working to display the messages in a JavaScript function after an Async Postback, but this only executes after a page turn. I want it to exe...
Hi,
As part of the application we are developing (with android client and Django server) a json object which contains user name and pass word is sent to server from android client as follows
HttpPost post = new HttpPost(URL);
/*Adding key value pairs */
json.put("username", un);
json.put("password", pwd);
StringEntity se = new Str...
My JSON string looks like this,
[{"id" : "38","heading" : "Can you
also figure out how to get me back the
10 hours I
sp.....","description" : "Im having a
very similar problem with the Login
control - again it always generates a
default style containing
border-collapse - only in this case
.....","img_url" :
"~/Event...
My JSON looks like this:
{
"[email protected]":"Person1",
"[email protected]":"Person65",
"[email protected]":"Person24"
}
It's returned in various number of elements, and various keys. How do I traverse the data if my code is like this:
$.post("includes/ajax.php", {
group_id : $('#group').val()
}, function(data) {
//how d...
I am writing some code to give live feedback to the user on the validation of a form using AJAX. I have got it checking length and if the field is empty. Now I want it to sanitize the users input and if the sanatized input differs from the users original input then tell them which characters are not allowed.
The code I have written so f...
I have a function
$.post('php/client.login.php', {username:username, password:password}, function(json){
var ids = json;
alert(json.id);
}, 'json');
Which returns undefined, the json data i am trying to read is this
[{"id":"8","client":"sam","email":"sam","username":"sam","password":"sam","ca...
for some reason the success function isnt being called?
javscript:
$.ajax({
type: 'POST',
url: 'http://localhost/hf_latest_desktop/st_pages/user_area/acc_buttons/pass_change/pass_change_ajax.php',
data: data,
dataType: 'json',
success: function(e){
console.l...
I'm looking for a way to define and send a JSON object array. I've figured out how to define a single JSON object, turn it into a string and send it, but what about an array of this type? Probably something simple I'm overlooking...
var myColumnSetting = { "ColumnName": name,
"ColumnIndex": index
...
I have an html:
First name: <input type='text' name='first_name' value='' /><br/>
Last name: <input type='text' name='last_name' value='' /><br/>
<input type='checkbox' name='category[]' value='Math' /> Math<br/>
<input type='checkbox' name='category[]' value='Science' /> Science<br/>
<input type='checkbox' name='category[]' value='Hist...
Hi,
I have following kind of index while accessing json data using jquery
data.rows[0].student_1
data.rows[0].student_2
data.rows[0].student_3 and so on...
Now, i want to automate this thing in a loop like
for(var i=1;i<length;i++)
{
// so that i can access all student records i.e. student_1, student_2 and so on
data.rows[0].stud...
TLDR: I have an Openlayers map with a layer called 'track' I want to remove track and add track back in. Or figure out how to plot a triangle based off one set of coords & a heading(see below).
I have an image 'imageFeature' on a layer that rotates on load to the direction being set. I want it to update this rotation that is set in 's...
Hi!
I've got a lot of xml files, and embedded in some elements there are json serialized objects. They are quite difficult to read and modify. So question is:
Are there any Visual Studio addins availible that can take selected json-text in the editor, and visualize it (and maybe even allow for editing)?
if not, if I must build it - ar...
I'm trying to serialize using boost property tree write_json, it saves everything as strings, it's not that data are wrong, but I need to cast them explicitly every time and I want to use them somewhere else. (like in python or other C++ json (non boost) library)
here is some sample code and what I get depending on locale:
boost::prope...
I am using YQL's query.multi to grab multiple feeds so I can parse a single JSON feed with jQuery and reduce the number of connections I'm making. In order to parse a single feed, I need to be able to check the type of result (photo, item, entry, etc) so I can pull out items in specific ways. Because of the way the items are nested withi...
Hi there,
Here's my situation:
- a table with a varchar field in which i store serialized data from php
now I have to add another field to the mysql table in which i store JSON data also from php
As the table already has serialized data stored i was wondering if i can
unserialize > json_encode and store the data in the new db field?...