JSON string outputs a float value
Hello, I am parsing a JSON response (twitter api - cursor value) and what should be a string value seems to be a double value when I output it with PHP. Any idea how I get the real string value? ...
Hello, I am parsing a JSON response (twitter api - cursor value) and what should be a string value seems to be a double value when I output it with PHP. Any idea how I get the real string value? ...
I am using the WCF JSON serializer to produce JSON for use as return data for the ASP.NET MVC framework. I am doing this because the built-in JsonAction does not provide any way to control the naming of public properties in the serialized JSON. public override void ExecuteResult(ControllerContext context) { ... if (Data != null...
Is there a good example (code) for a datasource which binds to json data from a remote webservice? Or is there another smart way to bind json formatted data against for instance a grid control? (either be it web or win forms) I'm asking for the source code, since that way it can be tweaked a bit to the json better ...
Hey guys! Does anyone know if there is support for Chinese pinyin? I get the results here with correct Chinese pinyin (see "Show romanization" link). Thank you. ...
I have a silverlight control which makes an HttpWebRequest to an HttpHandler on the server side. The request is a post. The body of the post is an object serialized using the DataContractJsonSerializer. The Silverlight control is SL 4.0 Beta and the Handler is .net 4.0 Beta. When i inspect the streams in the silverlight control the seria...
I am trying to convert a pretty complicated JSON string with json2.js from json.org and I keep receiving a parse error. Unfortunately I can't figure out which character it is complaining about or if I missed an escape somewhere. At this point it would be great if I could get a second pair of eyes on it. Thanks to all who help! var js...
i have following code which work fine in Firefox, Safari but not working in internet explorer, $.post(postFile, { usernamePost: username, passwordPost: password }, function(data) { if(data.status==true) { $("#message").html("Correct Username or Password"); $("#message").css({color:"green"}); else { $("#message").html(...
Hi, How do I implement Restlet function which accepts JSON post? And how do I test this using curl? Thanks ...
Hello, I am java developer, (using Spring-MVC) never worked much on javascript, But I would love to have ajax features like auto-complete, ajax-form-validation, 'server-backed-pagination for catalog (or grid)' in my applications.. And there are lot of frameworks like Dojo, prototype, YUI, jquery, etc. etc. so My question is.. which fra...
Hi, I would like to use JSON for sending multiple variables like status, error-message and content to a Javascript function via Ajax. The problem I'm having is that I fetch the content from a database and almost all data that is sent back to the browser is multi-line. And because of that it seems like my JSON is not validated. An exam...
I make a JSONP request using MooTools: var username = 'hsz'; var password = 'pass'; var req = new Request.JSONP({ url: 'http://api.blip.pl/profile.json', method: 'get', headers: { 'Authorization' : 'Basic ' + Base64.encode(username + ':' + password), 'Accept' : 'application/json', 'Content-Type...
I would like to know how to parse a json feed by items, eg. url / title / description for each item. I have had a look to the doc / api but, it didn't help me. This is what I got so far import com.google.gson.Gson; import com.google.gson.JsonObject; public class ImportSources extends Job { public void doJob() throws IOException { ...
Let me explain what I'm trying to do, and if someone could point the correct way to do it & a solution to where I'm stuck that would be great ! Someone types url www.ABC.com/showItem/Blackberry I lookup "Blackberry" in my database and find data for it, now I want to show its details one a page. Hence in the View I do this return_dat...
I was reading about cookies and other related client-side storage options, and read about using window.name as a data cache of sorts: http://en.wikipedia.org/wiki/HTTP_cookie#window.name While it certainly has things that make it less desirable - and I won't sugar coat it, it is definitely a hack in the most true sense of that word - i...
I am using Grails Webflow, what ever object I pass to a view, it must be Serialized. My domain models "implement Serializable", so they work. The problem is when I get a response from a WebService. It is of the org.json.JSONArray class. I just want to pass the whole Array over to the view yet it doesn't implement Serializable, so it fa...
Hi, How do I concatenate multiple JsonRepresentation Object into one, without building my own string parser? Say I have 2 JsonRepresentation objs obj1 {"name":"obj1"} obj2 {"name":"obj2"} I'd like to get the concatenation: { {"name":"obj1"}, {"name":"obj2"} } Reading the JsonRepresentation, there is no easy way to do this except ...
Hi, Here's my goal : - open a tree - download the root nodes - expand automatically one specific node using AJAX (and loop n times here) until i find a leaf then select the leaf Here's the function that works when I declare the Tree : listeners: { load: function(n) { console.log('load(n)'); ...
I'm writing a little analysis page which will help me hunt down bugs in an application. In essence it allows to visually compare actual data and log entries, plus perform a bit of analysis on the data. Since this is for debugging only and since I will be deploying this on the live site I want it to have as little server load as possible...
Hello everyone, How do I create a proper JSON enabled WCF svc service by overriding the createhost function? Here's what I've tried... using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.ServiceModel.Activation; using System.ServiceModel; using System.ServiceModel.Description; using System....
I have a model public class User : EntityObject { public int Id { get; set; } public string Username { get; set; } public string Password { get; set; } } and I would like to return to the client a JSON result containing only the Username and Password members of the User. I am currently doing this like so return Json(new...