json

IEnumerable<T> VS IList<T> VS IQueryable<T>

New to the MVC.net scene (and .net for that matter), but seems I find a wide array of options when wanting to populate a "list" with data. In my case at the moment, I'd like to populate a list from a select query of items and render the results in JSON for output, so bear with me.... So, my viewmodel class is something like : [Seria...

Flickr API - Latest Photos from a Set?

I'm currently using this JSON to get the latest flickr photos of an ID: http://api.flickr.com/services/feeds/photos_public.gne?id=49107890@N06&amp;tagmode=any&amp;format=json&amp;jsoncallback=? Now I need to change my code to display a set instead of an ID. I can get some JSON return with this: http://api.flickr.com/services/rest/?met...

OData $format system query option causes Bad Request 400

I have a very simple Reflection-based OData sample the runs fine and generates json when I use the Accept header as indicated. However, I cannot get it to work with the $format=json parameter. Whenever I add that parameter, I get Bad Request. According to this, it seems like it should work: link text Note that other system query opti...

Trouble finding DataGrid to implement for over 10,000 records with pagination, filtering, and clickable links for each row.

I have tried using a few different data grids (FlexiGrid, ExtJs Grid, and YUI DataGrid) and have found YUI to work the best as far as documentation and features available. However, I am having difficulty setting up the data source. When I try to set it up using JSON, it takes too long, or times out. I have already maxed out the memory ...

How can I parse this JSON in Android?

I want to pull out the user block. The JSON result will always change, sometimes 4 users will be returned, sometimes 10 etc. { "results": [ { "user": { "avatar_url_thumb": "http://avatars.stocktwits.com/production/9998/thumb-1270014645.png?1270014645", "avatar_url_medium": "http://avatars...

IE 8 partially cut of my JSON data return from WCF service

Hi All, I am using treepanel and custom treeloader and call the ajax request when click the node. It is working fine in both IE and FF. But today we found out that if node have only one child (return only one record base on parent node id), then IE does not show child node. Same thing happening in Combo store as well if service return o...

Is it possible to work with HTTParty request results as an object

Hi guys, I wonder if it possible to work with HTTParty (http://github.com/jnunemaker/httparty) request results as an object. Currently i use string keys to access to values of result: result["imageurl"] or result["address"]["street"] If i were in JavaScript I could simply use: result.imageurl or result.address.street Regards, Alexe...

How to populate more than one drop down list at same time with same function.

I want to populate multiple select drop down list(3 different drop down list, not related) with JSON. <script type="text/javascript"> $(document).ready(function() { $.post("/Search/getDDListData/", { controlName: "MinPrice" }, function(data1) { populateDropdown($("#minPriceList"), data1); }); }); function populateDropdown(select...

jQuery JSON drop down not populating

Hi guys, I am trying to create a drop down list using jQuery, PHP and mySQL, here is my code thus far, HTML: <select id="box"></select><br /> <input id="button" type="button" value="populate" /> Javascript/jQuery: $(document).ready(function() { $("#button").click(function (){ $.getJSON("test_post.php", function(dat...

JSON objects with RoR accross multiple tables

What I want to do is make a JSON object which contains the outlet info, as well as the switch name and the switch port corresponding to that outlet. I know how to do it without using JSON, but it will be unpleasant and I will have to repeat the process for each outlet. There must be a better way. i looked at ActiveRecord::Serialisation ...

AJAX + OData + Basic Auth for Sharepoint 2010's ListData.svc, JSON-P or JSON + xdr

I am looking for a way to either: Do a cross domain plain JSON request a-la YUI IO (http://developer.yahoo.com/yui/3/examples/io/io-xdr.html with Basic Authentication) or alternatively, Have Sharepoint 2010's ListData.svc support JSON-P (e.g. /_vti_bin/listdata.svc/?$format=json&$callback=loaded) so I can use jQuery.ajax to make a Bas...

how can i trigger ajax error callback on success callback?

I'm looking for a way to trigger ajax error in success callback. i have tried to explain my problem code below: $.ajax({ url: requestURL, data: postData, type: 'post', success: function(response){ if(response.Success){ // do something }else{ // request workflow fails in this case, // i have to trigger thi...

how to use django models in XML?

Hi again, I have a simile timeline built and I want to use the data from some django models. I would like to known if is best to use XML or JSON. I don't known anything about any of the two, so if I have to learn, it's best to known which will do what I want. I will need to make some loops to iterate over the data and use variables. ...

how to avoid encoding problems using ajax-json and php-postrgesql

hey all together, i have problems with encoding when using json and ajax. chrome and ie encode umlauts as unicode when jsonifying, firefox and safari returning those utf-8 escaped umlauts like ¼Ã. where is the best place to give all the same encoding? js / php-get or by writing them to the database. and i think the next trouble is, wh...

Javascript issue causing IE to fail

I am getting this error Invalid character line 6254 character 9 the code there is return eval("(" + string + ")") I did a console.log(string) here is the json result Every other browser it loads fine, just nothing any version of IE ...

what is regular expression for matching single line with multi match ?

$str = "Data = [ {"name": "test","Address": "UK" "currency": "£" },{"name": "test2","Address": "US" "currency": "$" },{"name": "test","Address": "eur" "currency": "E" } I want to display all address its not multi line string . It all a single string Please help on this Thanks , TREE J ...

Deserialize JSON with embedded Dictionary<string, string>

I need to determine if the DataContractJsonSerializer can deserialize JSON to a Dictionary if the Dictionary is not the wrapping object being deserialized. I know there are other open source codes projects that may be able to do this (json.net, json-framework) but I'd like to know definitively if .NET can natively handle this before taki...

Is it possible to memcache a json result in App Engine?

I think my question is already clear enough, but to make it even more clear i will illustrate it with my example. I'm currently returning many json every request, which I would like to cache in some way. I thought memcache would be great, but I only see that they use memcache for caching queries. ...

Facebook Graph API, how to get users email?

I'm using the Graph API, but I can't figure out how to get a logged-in users email address. The intro to Graph states "The Graph API can provide access to all of the basic account registration data you would typically request in a sign-up form for your site, including name, email address, profile picture, and birthday" All well and goo...

Problem parsing this YQL JSON in Java/Android

Here is the JSON result: { "query": { "count": "4", "created": "2010-08-31T05:53:39Z", "lang": "en-US", "results": { "quote": [ { "symbol": "AAPL", "Ask": "244.17", "AverageDailyVolume": "23152200", "Bid": "244.12", "AskRealtime": "244.17", "BidR...