How can I parse this date format that my web service is receiving in JSON format in Perl? I'd like to convert it to a DateTime object:
Date(1216647000000-0400)
I assumed it was milliseconds since the epoch along with a time zone offset but the dates are way off.
...
I've got some JSON data that is giving me a list of languages with info like lat/lng, etc. It also contains a group value that I'm using for icons--and I want to build a legend with it. The JSON looks something like this:
{"markers":[{"language":"Hungarian","group":"a", "value":"yes"}, {"language":"English", "group":"a", "value":"yes"},...
I'm working with ExtJs framework and so have to code a lot of JS in vs2008, however, VS2008 keeps removing my indentation and its driving me nuts.
How do I remove the "auto-indent" feature? Thanks
...
I've a couple of problems debugging code returned in an Ajax call - specifically, a function returned in json (errors don't get trapped in Firefox) - up to the point where I started debugging these problems in Internet Explorer (I think it's a firefox related problem, as Venkman doesn't detects those errors either) Do you know of any way...
Which PHP RPC (XML or JSON) library have you successfully used?
I have done some research but haven't been able to find one library that stands out from the others.
I've found the following:
XML-RPC for PHP
XML_RPC (PEAR)
JSON-RPC PHP
And a few others that either don't look very active or mature.
...
Given a contract such as:
[ServiceContract] public interface IService
{
[OperationContract]
[WebGet(UriTemplate = "GetData/{id}.{format}")]
ResponseData GetData(string id, string format);
}
Is there a way to get the service to respond with json when requested as:
/GetData/1234.json, xml when requested as /GetData/1234.xml ...
I'm looking to render an index of all articles along with a full article via json in my rails app, but I'm having a little trouble figuring out how to do it.
Here is my controller now:
if params[:id]
@article = Article.find(params[:id])
else
@article = Article.published.not_draft.by_recent.first
end
respond_to do |format|
for...
I've recently started working with JSON and the ExtJs framework and I've come across the following code in an example.
we retrieve the information from the frontend using this:
object updatedConfig = JavaScriptConvert.DeserializeObject(Request["dataForm"]);
Then in the example they do the following:
JavaScriptObject jsObj = update...
I'd love to use render :json but it seems its not as flexible. Whats the right way to do this?
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @things }
#This is great
format.json { render :text => @things.to_json(:include => :photos) }
#This doesn't include photos
format.json { render :js...
I have the following jQuery code:
$.ajax({
type: "POST",
url: "Services/MyService.asmx/Select",
dataType: "json",
data: "{'data':'test'}",
contentType: "application/json; charset=utf-8",
success: function(msg){
alert(msg);
},
error: function(xhr){ alert(xhr.statusText);} ...
I'm sending a request to my PHP application through a JSON-encoded ajax request (form process). A post-request with character length of 4174 is successfully processed and the result is received correctly. Adding one additional character to the request causes my application to loop infinitely until Apache2 seg-faults. There are only 2 ...
Is there any security issues in using JSONP.
...
Hey everyone,
I have a json object that hold alerts and information about them:
var alerts = { 1:{app:'helloworld','message'},2:{app:'helloagain',message:'another message'} }
along with a variable that says how many alerts there are, alertNo. My question is, when I go to add a new alert, is there a way to append the alert onto the al...
I have a chunk of JSON which looks something like:
{
"map": [
[
"zimbraFeatureCalendarUpsellEnabled",
"FALSE"
],
[
"zimbraPrefCalendarDayHourStart",
"8"
],
[
"zimbraFeatureOptionsEnabled",
"TRUE"
],
[
"zimbraAttachmentsViewInHtmlOnly",
"FALSE"...
Hello fellow developers,
Is there any way to "subscribe" from GWT to JSON objects stream and listen to incoming events on keep-alive connection, without trying to fetch them all at once? I believe that the buzzword-du-jour for this technology is "Comet".
Let's assume that I have HTTP service which opens keep-alive connection and put J...
In response to a question I asked a few days ago, I'm attempting to stretch myself a little, and do something that I've not really focussed on much before. I've done some searching (both here, and in general), but can't find the answers (or even reasonable hints) to what I want to achieve (though, a few things come close-ish).
Basicall...
System.Exception: There was an error reading the city list for CANANDA ---> System.ArgumentException: Unrecognized escape sequence. (1056):
{code: "CA",cities: [{name: "Abbotsford",lat: 49029998,lon: -122370002},{name: "Calgary",lat: 51119998,lon: -114019996},{name: "Edmonton",lat: 53299999,lon: -113580001},{name: "Halifax",lat: 448800...
Hi
I've built an application that uses jQuery and JSON to consume an ASP.NET .asmx web service to perform crud operations. The application and .asmx are on the same domain. I dont mind people consuming the read operations of the .asmx remotely but dont want people randomly deleting stuff!!!
I can split the methods i'd like to be publi...
I recently saw a jQuery example where a POST was made to "Default.aspx/Test", where Test was a WebMethod in Default.aspx, and the content-type for the request was "application/json".
The reply from the WebMethod was in JSON. I always thought WebMethods returned SOAP responses, but if I'm interpreting this code correctly, like I said, th...
Every object I return from a WebMethod of a ScriptService, is wrapped into a d JSON object. That's ok. But I don't want the additional __type property to be served to the client, since I do manual processing with jQuery.
Is it possible?
...