Twitter Search API can return JSON format (as well as the rest of Twitter API). Happily Parsing JSON is very easy in REBOL thanks to Romano Paolo Tenca who wrote this json library during a coffee break according to the email hidden; JavaScript is required/msg17591.html" target="_blank" rel="nofollow">legendary story :). Nevertheless, Douglas Crockford, the creator of Json, also participated to the refinement of the library as you can see here.
All the job’s being done by the JSON library (JSON and Rebol’s format share the same common principle of simplicity), you can now request and parse Twitter in 10 lines of code (though only 5 really deal with twitter per se):
Rebol [
Title: "rebol twitter"
Author-Url: <a href=http://reboltutorial.com/blog/rebol-twitter/>http://reboltutorial.com/blog/rebol-twitter/</a>
Script-Url: <a href=http://reboltutorial.com/source/rebol-twitter.r>http://reboltutorial.com/source/rebol-twitter.r</a>
Date: 20-Aug-2009
Purpose: {
search twitter by keyword and parsing json result
}
]
;to test first copy this instruction in Console
keyword: ask "keyword (space is allowed): "
;then copy the rest below
do http://reboltutorial.com/source/json.r
;or if you downloaded json.r in your rebol directory:
;do json.r
;this for encoding url (you an also download it if you prefer):
do http://reboltutorial.com/source/encode-url.r
;////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
twitter: JSON-to-REBOL read to-url rejoin [http://search.twitter.com/search.json?q= (encode-url keyword)]
;////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
;uncomment to debug
;write clipboard:// mold twitter
;print all tweet messages
html-output: copy ""
foreach tweet twitter/results [
append html-output rejoin [tweet/text <br> newline]
]
write file: to-rebol-file rejoin ["twitter-" replace/all keyword " " "-" ".html"] html-output
browse file
Appending Notes:
1. You should iterate foreach through twitter/results and not twitter (uncomment ;write clipboard:// mold twitter to see why)
2. Because I know you’re lazy, “browse file” instruction will launch your default navigator for you - Rebol is so nice isn’t it

Note: for a complete Rebol to JSON converter see http://www.ross-gill.com/r/altjson.html
Update: See hurl online service for previewing web api return.















You’re getting famous: http://www.rebol.com/article/0424.html
(in the Rebol world, that is!)
Keep up the good work.
Yeah I saw this, great Carl likes my blog
Thanks.