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