Hi,
I have a controller action that effectively simply returns a JsonResult of my model. So, in my method I have something like the following:
return new JsonResult(myModel);
This works well, except for one problem. There is a date property in the model and this appears to be returned in the Json result like so:
"\/Date(1239018869048...
Hi friends, ok, I'm back. I totally simplified my problem to just three simple fields and I'm still stuck on the same line using the addJSONData method. I've been stuck on this for days and no matter how I rework the ajax call, the json string, blah blah blah...I can NOT get this to work! I can't even get it to work as a function when a...
For context, we are storing most of our data as JSON strings. This works very well with Hadoop on the backend and is easy to handle in Ruby on the front end. My data types fit the natural pattern for inheritance.
For simplicity, lets say I have a class Pet and a process FeedPet that feeds a pet. I also have a process WalkDog that only a...
Hey Everyone..
I have a web service that returns me a JSON object that contains the string "Hello World". How do I pull this string out of the object?
data = [object Object]
Thanks
Nick
...
I would like to design a web app that allows me to sort, browse, and display various attributes (e.g. title, tag, description) for a collection of man pages.
Specifically, these are R documentation files within an R package that houses a collection of data sets, maintained by several people in an SVN repository. The format of these f...
I'm considering porting a very simple text-templating library to scala, mostly as an exercise in learning the language. The library is currently implemented in both Python and Javascript, and its basic operation more or less boils down to this (in python):
template = CompiledTemplate('Text {spam} blah {eggs[1]}')
data = { 'spam': 1, 'e...
Hi!
I am developing a RESTful web service.
I have a bunch of entity classes (mostly JPA entities, but also other beans).
There are gazillions of object mapping, serialization, binding and whatnot libraries out there. I'm looking for a one that will enable me to:
Serialize the entities to XML and JSON
Serialization MUST support usin...
On the jQuery AJAX success callback I want to loop over the results of the object. This is an example of how the response looks in Firebug.
[
{"TEST1":45,"TEST2":23,"TEST3":"DATA1"},
{"TEST1":46,"TEST2":24,"TEST3":"DATA2"},
{"TEST1":47,"TEST2":25,"TEST3":"DATA3"}
]
How can I loop over the results so that I would have access to ...
Using mootools and JsonP I get "invalid label" error in Firefox Error console
JsonP seems to work (I get the data correctly)
{"jsondata":[{"title":"title1","link":"http://xxxx.xxx.xxx","thumbsrc":"http://xxxx.xxx.xxx/17_t.jpg" ,"description":".......","pubDate":"2009-03-09 06:26:00",},{"title":"title2","link":"http://xxxx.xxx.xxx","th...
Hello - I have a simple web method and ajax call and continue to recieve an error that saying that it can't convert a string to an IDictionary object???
Here is the ajax call:
var params = '{"ID":"' + rowid + '"}';
$.ajax({
url: 'EDI.asmx/GetPartnerDetails',
type: "POST",
...
Hi there,
I've retrieved a series of objects from the Twitter API, and I want to summarize them. I'm most familiar with analyzing results from a SQL query, but given a series of objects like this:
array(9) {
["results"]=> array(1) {
[0]=> array(9) {
["text"]=> string(14) "4.2 #runlogger"
["to_user_id"]=> NULL
...
How do i add new attribute (element) to JSON object using javascript
...
I'm using a filter to log exceptions thrown by actions which looks like this:
public override void OnActionExecuted(ActionExecutedContext filterContext)
{
if (filterContext.Exception != null)
{
//logger.Error(xxx);
}
base.OnActionExecuted(filterContext);
}
Now I'd like to handle all my JSON actions to return JSON resul...
I wanted to shared something I learned today with you all. My question was:
Can you pass a JSON object from JavaScript code to a .NET Page Method? For example:
var task = {
Title: $("#titlenew input", $(newTaskRow)).val(),
StartDate: $("#startnew input", $(newTaskRow)).val(),
EndDate: $("#endnew input", $(newTaskRow))....
I can't seem to get my app to compile when using JSON-framework http://code.google.com/p/json-framework/ with iPhone SDK 3.0.
My app compiles fine for the simulator, but when I go to compile for my device I get a 'codesign error' code 1. I've followed all of the installation instructions correctly, and when I remove the 'Additional SDK'...
I am dynamically adding script tags to the DOM so I can download JSON data. Occasionally something goes wrong with a download, and the script fails to load properly.
How do I tell the browser to give up on a script that has taken too long to load? I think this is important because the browser limits the number of open requests at one ti...
Hi
This is one of those situations where I've had to pick up and run with a new tech without having time to learn the foundations!
I have the following js function which calls out to PrintService, which returns me the HTML to inject into a div:
function showPrintDialog() {
$.ajax({
type: "POST",
...
Hi,
I'm writing an iphone application with JSON and am trying to turn JSON strings into objects (NOT Dictionaries or Arrays).
In Java, thanks to Reflection, I can easily turn JSON into javabean instances like this:
import net.sf.json.JSONObject;
class MyBean {
private String property;
public String getProperty() { return prope...
I'm writing a small browser game and as I'm not a good designer, I wanted to start with the technical part first and add the user interface later, so I wanted to have the first version include bot support, so everyone could write their own bot and have it play the game.
This way, I don't have to care about making graphics for the user in...
I'm using JSON for a web application I'm developing. But for various reasons I need to create "objects" that are already defined on the client script based on the JSON response of a service call. For this I would like to use a regex expression in order to insert the "new" statements into the JSON response.
function Customer(cust)
{
...