Other posts related to json

Displaying eBay’s JSON (JSONP) API in a jqGride

December 23, 2009 11:11 am

Ever decide you really hate creating proxy pages to get around cross site ajax?  Me too…  Good thing JSONP is around!  Here is an example I threw together to display eBay items directly from eBay!  (You need your own API key, which is free) This doesn’t include paging, I guess that’ll probably be an addition later. Have to check how flexible the jqGrid is…

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<script type="text/javascript">
$(document).ready(function(){
	  jQuery("#list").jqGrid({
	    url:'example.php',
	    datatype: 'xml',
	    mtype: 'GET',
	    colNames:['Inv No','Title'],
	    colModel :[ 
	      {name:'ItemID', index:'ItemID', width:100},
	      {name:'Title', index:'Title', width:400}
	    ],
	    pager: '#pager',
	    rowNum:10,
	    rowList:[10,20,30],
	    sortname: 'invid',
	    sortorder: 'desc',
	    viewrecords: true,
	    caption: 'My first grid'
	  }); 
 
	$.ajax({
	   url: "http://open.api.ebay.com/shopping?callname=FindItems&responseencoding=JSON&appid=__YOUR API KEY HERE__&siteid=0&version=517&QueryKeywords=Rutgers&MaxEntries=50&callback=true",
	   dataType: "jsonp",
	   async: false,
	   jsonp: "_cb_FindItems",
	   processData: false,
	 });
 
});
function _cb_FindItems(array)
{
	array = array.Item;
	//Load jqGrid
	for(var i=0;i<array.length;i++){
		jQuery("#list").addRowData(i, array[i]);
	}
}
</script>

Josh Needs a New Project (Part 2)

September 3, 2009 10:24 pm

So Dunxu came through, he had a project idea.  Its a pretty awesome idea too!  Not that I’ll share it with you yet, but you will see it eventually.  Now instead of going out at night, I’ll just be hacking away at my desk.  It will definitely save me money, I guess I’ll still show up at the analyst happy hours.  (And pretty much whenever my friends go out…)

Technologies I’m planning on using in one place or another:

ruby on rails – web frontend, so far its pretty easy to hack in…

erlang – powering some more compute intensive operations using mapreduce potentially spawned over a compute grid, but only if the site takes off.

python – because why not, its fast enough and plays well with others, its my project and I’ll hack it together however I want!

Amazon AWS – eventually…

memcached – used pretty much everywhere, databases are too slow for popular lookups…

Some database system, but I’m not sure which yet, but it will be behind the cache.  I’m thinking maybe ErlyDB or CouchDB.  As I said earlier, its my project and I’ll hack it together however I want.

Show me more… »

Get Adobe Flash playerPlugin by wpburn.com wordpress themes