json

Generate JSON - how to improve performance

Here is what I am doing currently. Get data from database in DataTable (max records would be 100 but stored proc will search against more than 500,000 records. I already took care of search optimization in database. I am looking how I can improve the performance as much as I can in step# 2 and step# 3 below.) Create a generic list (Li...

ExtJS: missing } after property list but I dont see any code errors

load failed -- arguments: [Object api=Object, Object request=Object reader=Object scope=Object, Object tId=0 status=200 statusText=OK, SyntaxError: missing } after property list message=missing } after property list] I got that error by adding an exception to my store but don't see any real error in my code...maybe another set of eyes ...

Using JSON in XUL <template>s

As far as I can tell, the template feature in XUL doesn't allow you to load JSON data into your listbox/tree/etc. element. -- it only supports XML and RDF. The closest thing I found to an indication that it might someday support JSON, is the comments on this blog post from 2007, saying that there was a bug filed. But the bug in question ...

JSON response from jQuery get raises "Invalid label"

$.ajax({ beforeSend: function(xhr) { xhr.setRequestHeader('Authorization', "Basic YWRtaW46YWRtaW4="); }, url: "https://test.com/incident.do?JSON&amp;callback=?&amp;sysparm_action=getRecords", dataType: "json", contentType: "application/json", method: 'GET', success: function(a,b,c) { alert(a); ...

Length of a JSON object

This function is generating a array with json objects on it: var estoque={}; function unpack_estoque(tnm,total,estoque_vl,id,tid,st) { tnm=tnm.split("|"); total=total.split("|"); estoque_vl=estoque_vl.split("|"); id=typeof id != 'undefined' ? id.split("|") : null; tid=typeof tid != 'undefined' ? tid.split("|") : null...

JSON not loading with jQuery.ajax()

Hello everyone, I am using a web service that returns JSON data. test.com/incident.do?JSON&sysparm_action=getRecords Loading this URL in a browser prompts me to open incident.do, which opened in Notepad displays the valid JSON data. Then, in a web page in the same domain, I use this: $.ajax({ beforeSend: function(xhr) { xhr.setRe...

Problem with struts 2 and json plugin

I'm using the json plugin that comes with struts 2 (json-lib-2.1.jar) and trying to follow the website to set it up. Here's my struts.xml <struts> <package name="example" extends="json-default"> <action name="AjaxRetrieveUser" class="actions.view.RetrieveUser"> <result type="json"/> </action> </package> </st...

How on earth do I go about getting a single value out of this huge JSON object?

All i need to get is the jpg file "url" value in the results chunk. JSON is quite new to me... { "ok":"ASSEMBLY_COMPLETED", "message":"The assembly was successfully completed.", "assembly_id":"99b0303243fd4a2f5da38111677aca71", "assembly_url":"http://api2.vivian.transloadit.com/assemblies/99b0303243fd4a2f5da38111677aca71", ...

Parse string as Json?

Hi All, I have a json string but the format is strange [[5706,[ [1132001,"Aston Villa","West Ham",5706,'2010-08-14T15:00:00.0000000',[[1966752,0],[1977724,1]],[],"","","","",64,63], [1132002,"Blackburn","Everton",5706,'2010-08-14T15:00:00.0000000',[[1966753,0],[1977721,1]],[],"","","","",83,66], [1132004,"Bolton","Fulham",5706,'2010-0...

Problem with Javascript Date function in IE 7, returns NaN

I have a twitter feed and I create a new date obj so I can format the date to my liking. var created = new Date(this.created_at) works in firefox and chrome but not in IE7. I seem to be having trouble passing the date through the new Date() function. It just returns undefined and NaN. Here is the code. If you try to test it out don't ...

JSON decoding without each function

Hi All i have a json formatted out put as {"baseUrl":"\/","success":true} how get the value of success ?? ...

Send NSMutableArray as JSON using JSON-Framework

Hi all, I'm using JSON-Framework in my project successfully to decode JSON send from a server. Now I need to do it the other way around and I'm facing problems as the data to be sent is a NSMutableArray fetched from CoreData. When using NSString* jsonString = [menuItems JSONRepresentation] I get the message "JSON serialisation not ...

Can i export a JSON object to Excel in ASP.NET MVC site

i am already creating a "table" by having a list of json objects. Is there any generic way i can export this to excel without a lot of custom coding for the details of the data itself? ...

WCF service to return JSON-formatted faults

Is it possible to get a WCF service to return a 'fault' to the client? I'm led to believe this is possible when using SOAP, but I'd like to be returning JSON. Ideally, the HTTP response code would be set to something to indicate that an error occured, and then details of the problem would be available in the JSON response. Currently, I...

How can I create an organisational chart from the google chart tools / virtualization api using a .NET DataTable?

I would like to create an organisational chart as shown here: http://code.google.com/apis/visualization/documentation/gallery/orgchart.html I can create the JSON google.visualization.DataTable string using the .NET Visualization helper library from here: http://code.google.com/p/bortosky-google-visualization/ Unfortunately with this he...

Can you use other formats beside XML with XMLHttpRequest?

I understand JSON can be used instead of XMLHttpRequest in Javascript, but can I make requests and get totally arbitrary data back? Like a custom text or binary format? Or is the interface limited to jSON and XML? I hope I get through what I wonder here... a) How do I create a plain request without XML or JSON? b) How do I access ...

Getting an unterminated string literal error..I can make it pass, but can't figure out why..

I'm getting an unterminated string literal error in Firebug: Unterminated string literal $(".search_info").html("<div id=\'sear...arm_bg.png?1279054090\" style=\"displ\n This error is being rendered from clicking on a Sort By that toggles 'Most Recent' I have narrowed it down to the 'about_us' text. By removing certain parts of the t...

Parsing Facebook Open Graph API JSON Response in C#

I try to get parse JSON response for the following link: https://graph.facebook.com/feed/?ids=135395949809348,149531474996&amp;access_token= The response is like that: { "135395949809348": { "data": [ { ....Some data }] } , "325475509465": { "data": [ { ....Some data...

Exception while trying to deserialize JSON into EntityFramework using JavaScriptSerializer

I'm trying to deserialize JSON which I'm getting from an external source into an Entity Framework entity class using the following code: var serializer = new JavaScriptSerializer(); IList<Feature> obj = serializer.Deserialize<IList<Feature>>(json); The following exception is thrown: Object of type 'System.Collections.Generic.List1...

Loop through json object and catch variables on the fly (jquery)

Using jQuery I get JSON object that extracts one row from database. That row has about 30 columns so along with row data, success message (success = true) JSON result returns array with table columns (ex: id, name, address, etc) called table_columns. The purpose is to place all the returned data into the relevant html form fields (for e...