json

receive JSON array as argument in web service

I'm using a web service programmed in Visual Basic .NET 3.5 to receive a JSON Array sent from other application. I'm sending a JSON string like this one: [{"idRecoleccion":1,"PIN":"553648138"},{"idRecoleccion":2,"PIN":"553648138"}] And I'm receiving the code in Visual Basic .NET as follows: <WebMethod()> _ Public Function ConfirmaR...

ExtJS combo elements disappear on select

I have a simple combo box with some values in it, populated by a json store. The problem is that when I click the drop down and select a value, all the other values disappear so that I cannot select another value. Heres my code: Ext.onReady(function(){ var dropDownStore = new Ext.data.JsonStore({ autoDestroy: false, fields: ['g...

how to convert a ruby hash object to JSON

How to convert a ruby hash object to JSON? So I am trying this example below & it doesn't work? I was looking at the RubDoc and obviously Hash object doesn't have a to_json method. But I am reading blogs, that Rails supports active_record.to_json and it also supports hash#to_json. I can understand ActiveRecord is a Rails object, but Has...

ERROR: 'ContentNegotiatingViewResolver'of Spring 3.0.3 MVC Portlet+JSON ...

Hi, I want to make spring MVC 3.0.3 portlet using DispatcherPortlet class With JSON support. So, i added following configuration in the spring context file. <bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver"> text/html ...

why json_decode isnt working for some code??

for this json api response I am able to parse with json_decode: $string = '{"name": "Google", "permalink": "google", "homepage_url": "http://google.com", "blog_url": "http://googleblog.blogspot.com", "blog_feed_url": "http://googleblog.blogspot.com/feeds/posts/default?alt=rss", "twitter_username": "google", ...

how to implemnt JSON simple parser in c++ ( can't use external libs )

Hi one of my clients want to implement JSON parser and reader in c++ he doesn't want to adopt third party lib. so i like to know where i can find simple implementation of JSON parser so i could adjust it or implement it in c++ Thanks ...

Unknown fields in Django Model

I am hoping to to build a model for a single table that houses different types of "articles" (for argument's sake). Each article will have MOSTLY common fields (e.g. title, date etc.) but there are cases where some article types (outside of my control) have slightly different field requirements and respective validation rules . No fie...

Best-practice for javascript configuration on new web project

Hi all, I would like to ask a question about a new and large scale web project's javascript requirements. We will use lot of javascript, ajax requests, jquery, json objects & jquery plugins in our project. We planning to store global variables and lot of default values in a global site configuration file with php class and ini file on s...

webservice that returns JSON data

Hi frnds.... I have tiered of Googling but did't get any clue for myself. I want to make a web service which will have any method (let say-ProductInfo) & when i pass a productId in this method this will return the entire information of Product(like-ProdName,ProdPrice etc) in JSON format(File is downloaded with the Information of product...

Xml to Json Conversion using Newtonsoft Json.Net: Removing @ prefix?

I am using Newtonsoft Json.Net to convert Xml to Json. Following Xml <root> <person id="1"> <name type="first">Alan</name> <url>http://www.google.com&lt;/url&gt; </person> <person id="2"> <name type="last">Louis</name> <url>http://www.yahoo.com&lt;/url&gt; </person> </root> Is converted to following Json. { "root":...

chrome re-ordering object keys if numerics, is that normal/expected

i noticed that certain code that evaluates some shoe sizes JSON for an e-commerce site and outputs them on screen is messing up the order in chrome. the JOSN string given can be: {"7":["9149","9139","10455","17208"],"7.5":["9140","9150","10456","17209"],"8":["2684","9141","10457","17210"],"8.5":["9142","10444","10458","17211"],"9":["26...

jstree icon problem & how to 'click to expand'

I am using jsTree for creating a documentation list index.I use JSON to create my tree. I have a problem and a question. My problm is, the same icon (default icon set in types) appears for both folders and files. When i change the default icon, all tree icons set to that icon. If i do not use types plug-in, default folder icon is used f...

Best way to build HTML from json

Hi , I'm trying to build a POC to migrate a heavy JSF application to a stateless ajax/restful application . In the proccess i can't decide what is the best way of presenting the JSON data returned to the screen , i can see 2 major approaches one is to have templates and use something like prototype's toHTML() with them and the other is ...

Training material for JavaScript/JSON

Hello. Does anyone know about a good tutorial/article/whatever to help me explain JavaScript ( with emphasis in JSON ) ? I want to teach to the new team members what is JSON and how to apply it effectively, but instead of trying to re-invent the wheel ( and probably doing it wrong ) I'm looking for some training material, article, ta...

Google maps geometry controls identify coordinates array

Hi, in this example on geometry.js page i found saveData function that save "info" to arrays and JSON data format (not working), if I alert(record.type); i get "point" or "polilyne" according th object i've clicked, if i alert record.title output the title very right, but when i alert record.coordinates the output is undifined... i jus...

Can't get jQuery Ajax to parse JSON webservice result

I have validated the JSON response from my C# Webmethod, so I don't believe that's the problem. Am trying to parse the result using simple jQuery $.ajax, but for whatever reason I can't get the method to correctly fire and parse the result, also incidentally can't seem to get the function to fire the result. Are their any limits on the...

what's the different between $.ajax(...type: "POST", dataType: "JSON"...) and $.post(..., "JSON")

I can get the return json string parse with $.post(), but not $.ajax(). {"result": "success", "id": "1"} ...

How would I read such a json structure?

{"some_id": [ {"city":"Bellevue"}, {"state":"Washington"} ] } ...

Deserialize an object from an NSDictionary from TouchJSON?

I can't seem to work out how to get a Dictionary representing an object from the dictionary that TouchJSON returns. For example: If I use the JSON in the format here: http://search.twitter.com/search.json?q=hello How would I get a tweet with the "id" = x without having to pull all of the tweets into an array using a "for" statement? ...

creating a jquery grid from json data that came back from an ajax request

hi everyone, i am searching for a way to create a grid (from some kind of jquery grid plugin didnt choose one yet) anyway i want to call a webmethod and return a json serialized from a List of an object i created. today i just use a regular grid view inside an iframe. but i want to eliminate that iframe and create those grids with aj...