json

How to pass a JSON date value via ASP.NET MVC?

ASP.NET Json() formats and returns a date as {"d":"\/Date(1240718400000)\/"} which has to be dealt w/ on the client side which is problematic. What are your suggestions for approaches to sending date values back and forth? Thanks ...

Converting JSON date(ticks) to NSDate

Does anyone know how to convert a JSON date(ticks) to an NSDate in Objective-C? Can someone post some code? ...

Does anyone know how to convert NSDate to Date(ticks)?

Does anyone know how to convert a NSDate to JSON Date(ticks) to have sent to a .net web service? ...

How to decode a JSON string in PHP?

I have a JSON string that looks something like this: {"addresses":{"address":[{"@array":"true","@id":"888888","@uri":"xyz","household":{"@id":"44444","@uri":"xyz"},"person":{"@id":"","@uri":""},"addressType":{"@id":"1","@uri":"xyz","name":"Primary"},"address1":"xyz","address2":null,"address3":null,"city":"xyz","postalCode":"111111"}]}} ...

How do I prevent JSON serialization in ASP.NET MVC?

While developing an ASP.NET MVC app, I'm finding a few places where my JsonResult actions throw an exception "A circular reference was detected while serializing an object". For now, I'm removing the references in question, but ideally I'd like to simply mark the property such that the JSON serializer ignores it. Can anyone suggest how...

How to get a Struts form bean in an Action class using AJAX

Hi guys, I'm currently developing with Struts 1 a web application. I've recently started to use AJAX technology and I'm stuck with something. I call an action method (via AJAX) to validate my form but no values are changed in the form bean when it gets to the action method. I suppose this is because calling the action via AJAX doesn't ...

c# serialized JSON date to ruby

Hi guys, I have a C# application that serializes its DTOs to JSON and sends them accros the wire to be processed by Ruby. Now the format of the serialized date is like so: /Date(1250170550493+0100)/ When this hits the Ruby app I need to cast this string representation back to a date/datetime/time (whatever it is in Ruby). Any ideas h...

Returning Error Details from AJAX-Enabled WCF Service

Short Version: Is there a/what is the suggested way to return error details to the client when an exception is thrown in an AJAX-Enabled WCF Service (aside from just throwing the gates open and sending back all of the exception details)? Long Version: I've got a relatively simple AJAX-enabled WCF service that I'm calling from the clien...

Generating JSON Object

I'm trying to parse the rows in a table that I generate using javascript by adding items to a cart and then create a json object when the user hits save order of all the items and pass it to a php script using $.post in jQuery. The only trouble I'm having is understanding JSON objects and how to push more items onto the object. I get an...

best way to pass authentication when using ajax

I'm working on developing a page that pulls data down only via ajax: http://itprojectguide.org/projectmatrix/itprojectguideprojectmatrix.html the page currently pulls a status json data file. To authenticate I'll be adding a preliminary signin (user name/password) and I'm thinking about doing the following to ensure a valid logged in u...

using JSON-Framework to prepare a json object to post via HTTP Request Objective-C

I am successfully using the json-framework to do GET HttpRequests. Does anyone have code to prepare a json object and do a POST HTTP Request? If so, can you please share some sample objective-c code. Thanks ...

Generating a JSON payload for POST HTTP request in Objective-C

Does anyone have any sample code to create a JSON payload to be sent as a HTTP POST Request in Objective-C? An example of the json payload I am looking to generate looks like: {__metadata:{\"Uri\":\"/NewLoc/\", \"Type\":\"Location.NewLoc\"}, \"LocID\":\"100006\", \"latitude\": \"40.123456\", \"longitude\": \"-65.876543\", \"VisitDate\":...

Translating JSON into custom dijit objects

I am looking for an example where JSON constructed from the server side is used to represent objects that are then translated into customized widgets in dojo. The JSON would have to be very specific in its structure, so it would not be a very general solution. Could someone point me to an example of this. It would essentially be the ...

Strongly type returned JSON using MonoRail

Hi I am calling the following method in my controller using $.getJSON() [return: JSONReturnBinder] public object ProfileFields() { var userfields = _profileSvc.GetFields(282); var fields = from f in userfields select new {f.ID, f.FieldName}; return fields; } My _profileSvc comes back with extra data...

XML to JavaScript hashes/arrays on the client

Any client js libraries for turning XML into a JavaScript object? I'm specifically working with RSS and ATOM XML. I don't want to go from XML to JSON then eval(). I'd like to go from XML directly to JavaScript hashes/arrays. ...

Delphi Interbase JSON server

I'm building a little personal project; I wish to have a Windows Service that will act as a simple HTTP server accepting requests via HTTP, run queries against an Interbase 6/7 server and then return results in JSON format. Could anyone recommend some tutorials, free components or just a quick plan of how they would develop the various ...

Silverlight access an ashx JSON response

I have a Silverlight application that is calling out to an ashx that is hosted in the same application as the Silverlight control. The ashx does the following (stripped down): // Basic object class SomeObject { int ID { get; set; } string Description { get; set; } double Value { get; set; } } // ASHX details DataLayer dl ...

jQuery Autocomplete with JSON

Is there any currently-maintained jQuery Autocomplete plugin that accepts JSON input from the server? ...

about json file direction ???

hi all, in jquery.subgrid.js --> for json request this term $.parse(JSON.responseText) showing undefined. what return JSON.responseText???? ...

Why is it a bad practice to return generated HTML instead of JSON? Or is it?

It is quite easy to load HTML content from your custom URLs/Web services using JQuery or any other similar framework. I've used this approach many times and till now and found the performance satisfactory. But all the books, all the experts are trying to get me to use JSON instead of generated HTML. How's it much more superior than HTML...