Friday 12 Mar 2010   
Add Comment

Deserializejson - Twitter example

ColdFusion Tutorial #39

Workign with JSON in ColdFusion is easy. The two functions deserializeJson and serializeJson are easy to use and work the same way on the three main CFML engines.

demo.cfm

Following Stephens example of CFFEED and Twitter I wanted to follow up with a alternate method of retriving data and demonstrate how easy it is to manipulate with ColdFusion.

The result set is a block of JSON which is easily converted to a usable structure that we are all familiar with.

Line 5 converts the raw JSON into native ColdFusion structure.

Line 7 loops the array of results.

I added a timer to this and the CFFEED example. In reality this isnt very accurate due to Twitters servers sometimes beign slow but a json result set is generally smaller to transmit then an RSS feed.

 
 


Demo

See this code running!


Download

Download this code as a zip!


Comments

There are no comments!

Click button to add a comment


Author

Paul Kukiel


Published

Tuesday 23 Jun 2009

Tags

cfcatch  cfdump  cfhttp  cfloop  cfoutput  cfset  cftry 

convert dvd to ipod converter psp   Winnipeg Colleges   Free debt consolidation loan services.   SSAT Prep   Tutorial Jobs for Felons Online   Discount cigarettes   online MBA degree   EMF Financial   Sharath Sury