Hi,
I am building a scraper with Javascript (AJAX; Prototype) and PHP (Curl).
The url is served trough AJAX to the PHP/Curl.
The response is a huge HTML string. I would like to send the string in JSON to Javascript so I can process it.
If I send the raw responseText it works just fine, the html (string) get's rendered on my screen. Ho...
I have seen many examples of json web services with WCF in asp.net that accept one in-parameter. I need my service method to accept many parameters and return a list like this;
public List<Car> GetCarById(int carId, int password, List<Car> carList);
How can I call this service if I want to pass all these parameters? I'm trying to use ...
I have seen many examples of json web services with WCF in asp.net that accept one in-parameter. I need my service method to accept many parameters and return a list like this;
This is my Service.svc:
public class Car
{
public string Title;
public int Number;
}
[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements...
I am very new to Flash development.
I have an asp.net mvc site that has a controller action that returns JSON.
I have a Flash Media Server setup that needs to call that controller action every 15 minutes to get the current schedule. I can get the FMS to call the site (and every 15 minutes no problem) and I am getting the JSON right now...
I have a user control that creates a jQuery DatePicker (standard one in the UI). This user control is called twice by my page (date from/to) so I have dynamic ID's for my inputs/controls/buttons/what-not. I need to somehow set either a hidden input or use a webmethod somehow to set a variable on the user control so the search function ...
I can't seem to access my objects.
after parsing the server string:
var json = JSON.parse(myJsonText):
I get the below with an alert:
alert(json.param1)
{"ID":17,"Name":"swimming pools","ParentID":4,"Path":""},
{"ID":64,"Name":"driveways","ParentID":4,"Path":""}
Now, I am trying to access ID and Name.
I have tried:
json.param...
I have a simple view that I'm using to experiment with AJAX.
def get_shifts_for_day(request,year,month,day):
data= dict()
data['d'] =year
data['e'] = month
data['x'] = User.objects.all()[2]
return HttpResponse(simplejson.dumps(data), mimetype='application/javascript')
This returns the following:
TypeError at /sc...
Mostly I have just used XML files to store config info and to provide elementary data persistence. Now I am building a website where I need to store some XML type data. However I am already using JSON extensively throughout the whole thing. Is it bad to store JSON directly instead of XML, or should I store the XML and introduce an XML pa...
Hi,
I'e converted my list of products to a JSON object and now I want to use the JSON object with auto complete functionality.... I want to use only the JSON object for auto completion.. please help me out guys.
...
I'm passing a table of up to 1000 rows, consisting of name, ID, latitude and longitude values, to the client.
The list will then be processed by Javascript and converted to markers on a Google map.
I initially planned to do this with JSON, as I want the code to be readable and easy to deal with, and because we may be adding more struct...
Hello there,
Don't know if this particular forum is the best place to ask this question...
What is the best way to handle error response codes generated from Facebook REST API calls using server side Java?
For example, if in a deployed app, a person calls Friends.get:
http://wiki.developers.facebook.com/index.php/Friends.get
The fo...
class gpagelet:
"""
Holds 1) the pagelet xpath, which is a string
2) the list of pagelet shingles, list
"""
def __init__(self, parent):
if not isinstance( parent, gwebpage):
raise Exception("Parent must be an instance of gwebpage")
self.parent = parent # This must be a gwebpage...
Hey everyone
I don't know whether I am doing the right thing here, basically I want both of my class to be json-serializable.
import json
class gpagelet(json.JSONEncoder):
"""
Holds 1) the pagelet xpath, which is a string
2) the list of pagelet shingles, list
"""
def __init__(self, parent):
if not ...
Using the json-framework for iPhone (http://code.google.com/p/json-framework/) it's really easy to create json data from a NSDictionary. Like so;
NSString *json_string = [json_parser stringWithObject:dictionary];
This works perfect if I have objects like NSString and so on in my dictionary. But I also need to send integers,bools and f...
Can I make an ASP.NET AJAX AutoCompleteExtender use an ASP.NET MVC JsonResult rather than an ASMX Webservice?
I've got an ASP.NET AJAX Toolkit AutoCompleteExtender on an ASP.NET MVC View. It uses an JsonResult type function in my MVC Controller.
ASP.NET MVC View:
<form runat="server">
<asp:ScriptManager
ID="ScriptManager1...
jQuery Tools has flashembed which can pass a JSON object as a config parameter to the embedding Flash object. See the official page.
But it does not tell exactly how to get the JSON object in Flash. And that's the question... How??
...
For instance, I want to have a html form that looks like this:
<table>
<tr>
<td>Field A:</td>
<td><input type='text' name='fielda[1]'></td>
<td>Field B:</td>
<td><textarea name='fieldb[1]'></textarea></td>
</tr>
</table>
What I want is to add a button that duplicates my entire above form, but changes the 1 to a...
I'm looking for advice on the best way to represent this JSON object in C#.
To be clear, I'm not trying to convert from an existing JSON string to C# object - this is from scratch. I can visualize what I'm trying to create as JSON, but not sure how that translates...
[
{
"EquipmentID": "ASD2F",
"ConnectionIDs":[
{ "Connection...
Twitter's REST api allows you to append a JSON or XML at the end of the URI.
e.g.
http://twitter.com/statuses/public_timeline.json
http://twitter.com/statuses/public_timeline.xml
In the context of servlet, statuses will be the webapp context name & public_timeline.json is mapped to some servlet. I want to maintain one servlet to do ...
Hi,
I was wondering if anyone knows of any good JSON editors, preferably one that is a plugin for Visual Studio 2008?
Thanks
...