json

AddSeries parameters

Hi, I try hard to get some functional charts with dojo... I want to create a stacked area chart with 3 lines. For the "bas", "moy" and "haut" as you see in the JSON data. var jStore = {"identifier":"mois", "items":[{"mois":1, "bas":98, "moy":122.5, "haut":147}, {"mois":2, "bas":91, ...

JSON dot notation in jQgrid?

I am using addRowData method to populate my grid. But my current JSON data have another object inside of each object in the JSON data. To make it view in the grid, i followed the notations in the documentation of jQgrid. But that column remain empty. My Grid definition: $("#ExpenseTable").jqGrid({ datatype : "local", mtype ...

UTF-8 to Unicode using C#

Help me please. I have problem with encoding response string after GET request: var m_refWebClient = new WebClient(); var m_refStream = m_refWebClient.OpenRead(this.m_refUri); var m_refStreamReader = new StreamReader(this.m_refStream, Encoding.UTF8); var m_refResponse = m_refStreamReader.ReadToEnd(); After calling this code my string ...

Parsing external XML to JSON in Java?

So I'm sitting here with Google Geocoder, which returns an XML via 'GOOGLE_URL/xml?address=input&sensor=false'. I need to fetch it by using Java and parse it into a JSON object and send it onwards. How would I go about to do this? (No this is not homework) Note that it should preferably be done within the standard libraries. At the mome...

REparsing a JSON object in Java?

So I have a JSONObject (or String..) that looks like this: {"locations":[{"GeocodeResponse":{"result":{"formatted_address":"Tchibanga (TCH), Gabon","address_component":[{"long_name":"Tchibanga","type": ["airport","establishment","transit_station"],"short_name":"Tchibanga"},{"long_name":"Mougoutsi","type": ["administrative_area_level...

how to send a collection and a few other values in Json form to a webmethod?

Hi All, Upon clicking a button I need to send a collection and a few other variables to server in Json form.For each value in the collection the server code (C# ) wil update those other variables in the DB. For example there is a ‘classnumber’ collection with values (First, Second, Third, ….),other variables (‘teacher_name’ and ‘subjec...

Compress JSON using jqGrid

Is there a way to compress/uncompress JSON sent from an app server to a jqGrid client? Our app server is Java/JBoss. ...

Questions about maxJsonLength in ASP.NET

Hi. Recently, I ran into a problem with my application: the size of the JSON string returned from the server was exceeding the default maxJsonLength. I've done some research and implemented some fixes including a variation of paging. Everything looks great at the moment. However, I still have some questions unanswered. First of all...

Android, Drupal & DrupalCloud or Android-xmlrpc tutorial?

Does anyone know of a good tutorial for any of the above? I need to send data to Drupal from and Android phone. Data is stored in XML but can be converted to JSON easily. Then it needs to be stored in a user's profile. thanks ...

CircularReferenceError when serializing an ActiveRecord instance (fetched by using ThinkingSphinx) to JSON

I try to serialize an instance of my ActiveRecord model to JSON (using "render :json => @entities" or "@entities.to_json"), but I always get an CircularReferenceError ("ActiveSupport::JSON::Encoding::CircularReferenceError (object references itself)"). This only happens when the ActiveRecord instances are queried by using ThinkingSphinx....

InvalidCastException while trying to deserialize JSON in C#

Hi everybody, I'm trying to deserialize a Json stream. I'm working under Visual Studion for Windows Phone 7. Here is the code I'm using: public Accueil() { InitializeComponent(); string baseUri = "http://path/to/my/webservice"; HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(new Uri(baseUr...

How do I send JSon as BODY In a POST request to server from an Android application?

Hi, I am working on my first Android Application. Now wat I want to do is to make a POST request to a restfull service running on server and I want the BODY of this request to be a JSon String. I am using GSon to generate the JSon to send to server. The code I am using to make the POST request follows: HttpPost requisicao = new Http...

Problem retrieving values from JSON object

Hi Guys, I am having a little trouble retrieving the values from a JSON object that is returned after a jQuery GET request and I am hoping someone here will be able to help. I think I may be doing something stupid but cannot figure it out. In firebug the response is show as: [{"plan_id":"2","plan_name":"plan 2","plan_desc":"plan 2 des...

Facebook Graph API Question: How can i get permanent permission/access token to display a public photo album on a webpage?

I know it's possible to display public images once I have the access token, but how do I go about getting it? I found the facebook dev docs to be kind've confusing when it comes to extended permissions. Do i need to somehow register the image gallery/portfolio as an app and have the facebook user who's gallery it is allow it? Thanks f...

jqgrid howto send all rowData in json format to server?

how to send jqGrid data in json format to server? DO I have to use any external library or script to achieve that? Thanks! update1: extra licensePlateNumber should not be there [ { "licensePlateNumber": "" }, { "licensePlateNumber": "0000000000000029000721804", "sku": "795127", "description"...

How to handle json DateTime returned from WCF Data Services (OData)

I believe I am missing something obvious here. When I request a JSON response from an OData service I get a different result for the DateTime properties than I do when I request XML. I'll use the NerdDinner OData feed as an example. JSON: http://www.nerddinner.com/Services/OData.svc/Dinners(1)?$format=json "EventDate": "\/Date(12357648...

ASP.NET ScriptService deserialization problem with derived types

I have a ScriptService web method (.NET 3.5) which takes a single parameter of an abstract base type: [WebMethod(EnableSession=true)] [ScriptMethod()] public bool Test(Item item) { ... } And: namespace Namespace { public abstract class Item { public int id; } public class Group : Item { public Item[] items; } public class I...

Is there a JavaScript API for XML binding - analog to JAXB for Java?

In Java, we work a lot with JAXB2. Object<->XML mappings are defined as annotations in Java classes: @XmlRootElement(name="usertask", namespace="urn:test") public class UserTask { @XmlElement(namespace="urn:test") public String getAssignee() { ... } public void setAssignee(String assignee) { ... } } JAXB runtime can read ...

guidelines to convert xml into json using jquery

hi all, I have found so many questions on converting xml to json and vice versa. I am trying to convert xml into json using jquery and javascript. Can somebody tell me some guidelines for converting xml into json? ...

Json Parsing in Android Application

Hi Team, After completing the XML SAX Parsing now I am working on JSON Parsing in my application. Here I am providing you the Json Response : {"menu": { "id": "file", "value": "File", "popup": { "menuitem": [ {"value": "New", "onclick": "CreateNewDoc()"}, ...