json

MVC Open a FileContentResult also return a json result with same action

Hi I Want to Open a File as pdf but i also want to return my resluts on web page with the same action how would i do that. here is my code. public JsonResult FindRecordings(SearchCriteria criteria) { if ( string.IsNullOrEmpty(criteria.OrderNumber) && string.IsNullOrEmpty(criteria.ReferenceId) && string.IsNullOrEmpty(...

Rails, JSON Object, jQuery, Auto-Complete

I'm using this jquery autocomplete plug-in with rails: http://docs.jquery.com/Plugins/Autocomplete I can't figure out how to format my results, both in my Rails controller and in my javascript file. I have something like this in my controller... @query = params[:q].downcase @json = User.all(:login => /^#{@query}/) respond_to do |forma...

JsonIgnore attributes not working in ASP.NET?

I've got an object in my project with circular references. I've put [JsonIgnore] above the field like so: [JsonIgnore] public virtual Foobar ChildObject { get; set; } I'm still getting circular reference errors when I serialize the object. The only fields that do not have JsonIgnore are string fields and should not cause this....

asp.net mvc json open dialog box problem

function postForm() { $.ajax({ type: "POST", data: $("#myForm").serialize(), dataType: "json", url: '<%= Url.Action("JSONRequest","Home") %>', success: function(result) { window.alert(result.name); }, error : function() { window...

Problem reading List Collection in ASP.net MVC View through Json

Whenever i return a list collection from a controller through Json. Im unable to get that list but if i just return a string from controller its working fine. In View i have <script type="text/javascript" language="javascript"> $(function () { $('#btnFillList').click(function () { alert("btnclick"...

Is there still a place for XML in the future?

Now that many people seem to be moving towards JSON for web communication I am wondering about why XML should continue to be used. I appreciate that XML has many years on JSON, during which time it has been widely adopted. However, the fact that it is so well-adopted appears to be the one decisive reason why it should continue to be use...

POSTing JSON data to WCF REST

I'm trying to send data from a client application using jQuery to a REST WCF service based on the WCF REST starter kit. Here's what I have so far. Service Definition: [WebHelp(Comment = "Save PropertyValues to the database")] [WebInvoke(Method = "POST", UriTemplate = "PropertyValues_Save", BodyStyle = WebMessageBody...

Javascript: Save json data as a file on the server / user's hard disk.

I have developed an app that allows the user to fill out text fields with information. I want them to be able to press a button that will make a file with data (a really long array with info on what they typed and where it should go) so they can reload the data at a later date. I don't have a server now, and I am sending this app as a st...

What is the canonical way to return a json object in asp.net webforms programming?

In ASP.Net MVC action methods can return json objects simply by returning something like so: JSon([whatever]) How do I return a JSon representation of say List<String> with webforms either through a service or through a method in the code behind of an aspx page? This seems incredibly confusing compared to ASP.Net MVC. ...

Deserialize unnamed json array into an object in c#

Wondering how to deserialize the following string in c#: "[{\"access_token\":\"thisistheaccesstoken\"}]" I know how to do it if the json was: "{array=[{\"access_token\":\"thisistheaccesstoken\"}]}" I'd do it like this: public class AccessToken { public string access_token {get;set;} public DateTime expires { get; set; } }...

basic JSON pulling data help..

New to json data and struggling i guess the answer is real easy but been bugging me for the last hour.. Sample data { "data": { "userid": "17", "dates": { "timestame": "1275528578", }, "username": "harino54", } } Ok I can pull userid or username easy enoug...

How to determine if a RSS feed is XML or JSON?

Is there a way to tell if a feed is XML or JSON or both? thnx ...

Undefined variable error when parsing json

I'm trying to parse the json grabbed from here. Basically what I do is iterate over the items, sort them, then display them. But I get an error saying data.data.children[i] is undefined. I can't think why it's doing it though? var json = 'http://www.reddit.com/reddits/mine/.json'; GM_xmlhttpRequest({ method: "GET", url: jso...

Json Traverse Problem, not able to traverse values

I m getting the below return from ajax call but not able to traverse it please please help. { "1": { "tel1": null, "status": "1", "fax": "", "tel2": null, "name": "sh_sup1", "country": "Anguilla", "creation_time": "2010-06-02 14:09:40", "created_by": "0", ...

asp.net mvc dialog box mechanics at the end of the request

<form action="/Home/JSONRequest" method="post" enctype="multipart/form-data" onsubmit="return submitForm(this)"> <input type="file" name="file" id="file" /> <input type="submit" name="submit" value="Submit" /> </form> <script type="text/javascript"> function submitForm(frm) { var tdata = $(frm).serialize(); $.aj...

json object composition details

in .json text, is the 'value' in a basic single pair object the title of a value type (e.g. [string, number, object]), or a value for a typed object (e.g. 2, or "dog", or Object3)? This is how http://www.json.org/ presents the information: "An object is an unordered set of name/value pairs. An object begins with { (left brace) a...

JSON iPhone problem

My problem is quite simple, I'm sometimes receiving a JSON connection without the whole JSON value in connection, as such I'm getting 2 fragments, together making a whole. I can't call [jsonstring JSONValue]; until I have both joined together. The problem is, it is sometimes, so I really want to know in advance whether JSONValue will w...

Getting jStorage to work

So I think jStorage is what I need to solve one of my problems. It needs JSON to be working with jQuery, so I've tried including it, but it doesn't seem to work. I have no idea what JSON is actually. Here's my code (jQuery is loaded higher). It doesn't even show the alert window. <script type="text/javascript" src="jquery.json-2.2.min.j...

converting request parameters strings to JSON?

Possible Duplicate: Javascript / Jquery: $.param( ) inverse function Hi, I'm trying to do the inverse of the jquery param function, i.e. I want to convert a parameter string (e.g. "login=1&init=1") to JSON (so that it can be used with jquery). Is there an easy way to do this? ...

Export Sigma Ajax Grid's data to XLS, XML and CSV

Hi, I'm using the Sigma Ajax Grid... When I click in the pdf export button, in PHP, I can access $POST['_gt_html'] with the grid content: Array ( [__gt_html] => <style type="text/css"> </style> <table id="grid" class="gt-table" cellspacing="0" cellpadding="0" border="0" ><!-- gt : head start --><tr class="gt-hd-row"><td class="...