json

Deserialize JSON Object with JSON.NET

hi, i am facing a problem here, i really could not find a way to be able to strip out the values of my following JSON Object in a web method ASPX Code $(document).ready(function () { // Add the page method call as an onclick handler for the div. $("#Button1").click(function () { $.ajax({ ...

Problem using json in Golang (Go)

I am using json to store data on disk between program calls, the program runs fine for some time, but after that it displays error in json decoding, "invalid character '1' after top-level value ". Can anyone suggest some solution to this problem ? ...

posting an array of json using dojo

Hi I am trying to post an array of javascript objects back to the server, using dojo. I have an array of data that is like appears like this: var elements = [ myobj = {id:"1", name:"myname", title:"mytitle"}, myobj = {id:"2", name:"myname2", title:"mytitle2"} ] I want to post this as a json string back to the server to be handle...

Twitter trends CURL php

Hey Guys How do I extract current top 10 twitter trends using CURL. All the php tutorials I found seem to use the old twitter urls which have since changed.. Here is a new url I'm struggling with, the new date at the top seems to throw it http://search.twitter.com/trends/current.json Any ideas how to echo the values? e.g. output is ...

JSON can call method in .aspx file but not in .asmx (ASP.NET web service) file

I am using JQuery & JSON (POST) to call webmethod. However I can call only webmethod located at aspx file but not in asmx file Below are sample codes CustomValidate.asmx Imports System.Web.Services Imports System.Web.Services.Protocols Imports System.ComponentModel Public Class CustomValidate Inherits System.Web.Services.WebService ...

Jquery tree traversal - Nested Unordered list elements to JSON

Okay, Now I have an unordered list here: <ul id="mycustomid"> <li><a href="url of Item A" title="sometitle">Item A</a> <ul class="children"> <li><a href="url of Child1 of A" title="sometitle">Child1 of A</a> <ul class="children"> <li><a href="url of Grandchild of A" title="sometitle...

Help with rails json and jquery

Im trying to use this jquery ui widget for autocompleting a textbox in my app. I have created an index.json.erb file inside my views/university folder here's my current (piece of crap) code json='[' <% @universities.each do |u| %> json+='{ "id": "#{@u.name}" , "label":"#{@u.name}" , "value": "#{@u.name}"},' <% end %> json+=']' json N...

JqGrid not loading data from JSON

I have a JQGrid plugin in my website, the table is loading OK, but with no-rows to edit, select or whatever. It is requesting the server because when i watch the log I see the request and it's parameters (sidx, _search, rows, sord, nd, etc). This is the jqgrid code: $(document).ready(function() { var lastsel; jQuery("#rowed3")....

trouble parsing yahoo API json with jquery

I'm having trouble parsing the following link. I'd like to be able to extract a few of the object characteristics from each object in the array using $.getJSON(). Does anyone have a clue how I can do this? Thanks! http://search.yahooapis.com/NewsSearchService/V1/newsSearch?appid=YahooDemo&amp;query=market&amp;results=2&amp;language=en...

trouble parsing daylife json with jquery

Does anyone know how I would be able to access the "name", "url", "headline", "timestamp", and "excerpt" from the array "article" using the $.getJSON? http://freeapi.daylife.com/jsonrest/publicapi/4.8/topic_getRelatedArticles?topic_id=&amp;name=business&amp;start_time=2010-06-26&amp;end_time=2010-07-03&amp;sort=date&amp;offset=&amp;lim...

jQuery post() JSP return collection

My HTML looks like this: <script type="text/javascript" src="jquery-1.4.2.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#btn").click(function(){ $.post("test.jsp", { "txt": $("#txt").val() }, function(data){ alert(data); ...

How do I sort this JSON object by the languages on the right of each entry?

I am creating an Android app using PhoneGap and jqTouch, and I have a JSON object containing a word along with a language which that word is in. How can I sort this alphabetically, by the column on the right (the language), using Javascript? The end result should be Afrikaans as the first entry and Zulu as the last. var languages = { ...

JSON RedirecttoAction

I am trying to change a value in a table from one view, and then redirect to another view using Flash FSCommand and Json, using the following code: if (command == "nameClip") { var url = '<%= Url.Action("Index", "Home") %>'; var clip = [args]; try { $.post(url, { MovieName: cli...

When creating a native JSON array how to limit it to 10 most recent

I am creating a JSON array exactly as follows (bar using mathrandom). For example purposes: var numbers = []; var jsonString = ""; function EveryOneSec() { numbers.push(Math.random()); jsonString = JSON.stringify({'numbers': numbers}); setTimeout(EveryOneSec, 1000); } When I create the JSON string it will obviously just keep g...

How do I create a data structure that will be serialized this JSON format in python?

I have a function that accepts a list of date objects and should output the following dictionary in JSON: { "2010":{ "1":{ "id":1, "title":"foo", "postContent":"bar" }, "7":{ "id":2, "title":"foo again", "postContent":"bar baz boo" } }, "2009":{...

How to set id after creating new jstree node?

I'm using jsTree 1.0. And have this code : $(document).ready(function () { $("#folders_tree").jstree({ "core": { "initially_open": ["root"] }, "html_data": { "data": '<?= $folders; ?>' }, "themes": { "theme": "default", "dots": true, "icons": true, ...

php json_encode returning null

Array ( [sEcho] => 1 [iTotalRecords] => 7521 [iTotalDisplayRecords] => 1 [aaData] => Array ( [0] => Array ( [0] => Nordic Capital Buys SiC Processing [1] => 2010-06-21/nordic-capital-buys-sic-processing [2] => PEHub Media ...

ActiveRecord object serialization and deserialization to the database

Hello, I would like to deserialize an serialized object. So it's possible to process such as (with JSON): >> l = Yea.create(:title => "foo bar") => #<Yea id: 3, title: "foo bar", created_at: "2010-07-05 21:44:54", updated_at: "2010-07-05 21:44:54"> >> j = l.to_json => "{\"yea\":{\"created_at\":\"2010-07-05T21:44:54Z\",\"title\":\"foo ...

Populating an Extjs graph with json not working

So What Im trying to do is populate an Extjs line graph. Ive created a JSON store that pulls json from a remote page and for some reason my graph is not being populated. Heres my Ext code: Ext.onReady(function(){ var store = new Ext.data.JsonStore({ autoDestroy: true, url: 'http://myURL.com', storeId: 'graphStore', roo...

Json code retrieved with AJAX is unparsable.

Hi, I'm a beginner. I write simple json jquery php code to help understand the idea of json, but its not work, please help me.(I didnt write $_Post, submit, click function etc.. because its not working with, soo I cut the code to find the problem) The user enters view.html and should get an alert box with value Bob - the problem is th...