Hey,
I'm having a problem parsing a JSON file in AS3. Im trying to parse multiple JSON arrays, but don't really know how to get to the next after accessing the first one. My JSON file looks like:
{
"term": [
{
"id": 4211,
"place": "NEW YORK CITY"
},
{
...
I have some types which are generated by a web service reference. I want to serialize these objects using the DataContractJsonSerializer, so I need to add DataContract and DataMember attributes. Adding DataContract is no problem using partial classes. But the properties have no DataMember attributes, so I only get empty objects. Is there...
Hi everyone,
I'm some kind of lost with the way i have to deal with Javascript, JSON and Perl and most of the examples are in PHP which is not helpfull for me.
I have a page (called main.html) where i have a with data from MySQL and i have an option to delete a row by id.
Then i have the Javascript sending the id to page apagar.html ...
Hi all,
I want to be able to access properties from a json string within my java action method. The string is available by simply saying myJsonString = object.getJson(); Below is an example of what the string can look like:
{'title': 'Computing and Information systems','id':1,'children': 'true','groups':
[{'title': 'Level one CIS','id...
I have a JavaScript array of houses like so,
{
'homes' :
[{
"home_id" : "1",
"address" : "321 Main St",
"city" : "Dallas",
"state" : "TX",
"zip" : "75201",
"price" : "925",
"sqft" : "1100",
"year_built" : "2008",
"account_type_id" : "2",
"num_of_beds" : "2",...
Can you explain it in most simple words?
Best with a demo script.
...
$.ajax({
type: 'POST',
url: 'place/add',
data: {
lat: lat,
lng: lng,
name: name,
address: address,
phone: phone,
review: review,
category: category
},
success: function(data) {
alert(data);
alert(data.id);
// ......
});
The first alert gives:
{"id":...
I have three PHP arrays that I've encoded with json... extra PHP code has been omitted because the arrays work properly.... Additionally, the HTML tags that call the google chart have been omitted for sake of brevity...
<?php
$encoded_line_volume = json_encode($LineVol) . "\n";
$encoded_loan_volume = json_encode($LoanVol) . "\n";
$enc...
I am getting a error message, when I am trying to get a webservice response as json to jquery,
"Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property."
when i searched in the net, I could see some web.config settings for maxJsonLe...
Using this tutorial:
http://dotnetslackers.com/articles/ajax/Using-jQuery-with-ASP-NET.aspx
1) The web service is invoked such as
Service1.asmx/HelloToYou
The default web service in asp.net however won't load the page with this rewritten url, instead i can only refer to it as:
Service1.asmx?op=HelloToYou
How do I implement the so-call...
Hi All,
I cant find one way to get this value ("comment") into json using javascript.
var myJSONObject = {
"topicos": [{
"comment": {
"commentable_type": "Topico",
"updated_at": "2009-06-21T18:30:31Z",
"body": "Claro, Fernando! Eu acho isso um extremo desrespeito. Com os celulares de ho...
Hi,
I'm pulling my hair out trying to build a little random photo JSON feed using DataMapper/Sinatra. Here's what I have so far..
Photo.favorites.to_json(:methods => [:foo, :bar])
So that works fine. The to_json method is provided in the dm-serializer library. All I want to do is randomize that feed so the photos don't show up in the...
Hi,
I'm trying to combine multiple JSON objects into a single one in PHP. I'm iterating through the JSON objets, decoding them, parsing out the parts I want to keep, and storing them in a property in my php class.
Supposing my json objects look like the following format:
{
"lists" : {
"list" : [
{
...
Is there some library for flex, that will let me:
define properties to fully exclude from serialization
define classes to serialize without the property names (as if they were an array)
thanks...
...
I'm working with the last.fm api to get artist images, and I'm getting JSON results where I need to check an '@attr' value. Unfortunately, I can't seem to access this value. The results look something like:
{"image":[{
"url":"http:\/\/www.last.fm\/music\/Undefined\/+images\/3040021",
"format":"jpg",
"sizes":{"size":{"#text":...
i have a json string im converting to object with a simple eval(string);
heres the sample of the json string:
var json = @'
"{ description" : { "#cdata-section" : "<some html here>" } }
';
var item = eval('('+json+')');
I am trying to access it like so
item.description.#cdata-section
my problem is that javascript does not like the ...
I'm trying to retrieve JSON data from a remote site with Rails/Prototype.
I've found that there's a branch of Prototype that has an Ajax.JSONRequest() function. I can't get this to work.
jQuery has a $.getJSON() function, but I'm using some Prototype functions and I'd rather not switch to jQuery or use no conflict mode.
What am I miss...
Hello,
I'm making a post request to the server and getting back the array of data that I want, but I can't see to access the individual elements and I can't figure out why.
This is the jist of it
$(document).ready(function() {
$.post("myscript", { Action: "JQueryReq", },
function(data){
alert(data);
});
});
If I do the abo...
I can easily do this with JQuery or PHP but I have a project for my Intro to C++ class and I thought it'll be pretty cool if I could mix C++ with some APIs like twitter, google, yahoo etc.
Could you tell me if there is a class ( I know OOP ) I can use to read an external XML or JSON file. The program has to run on windows and linux so I...
I have come across several guides and packages on implementing a python JSON RPC server, e.g.:
http://json-rpc.org/wiki/python-json-rpc
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/552751
http://pythonpaste.org/webob/jsonrpc-example.html
They all do a good job in the sense that the server/application implementation is very...