JSON and Wordpress
If you want to encode/decode JSON within/using wordpress, you can take a look at
/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php
This file has Moxiecode_JSON class which can do that for you.
Sample code
require_once(ABSPATH."/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php");
$json_obj = new Moxiecode_JSON();
/* encode */
$json = $json_obj->encode(array("key1"=>"value1","key2"=>"value2"));
//$json should have {"key1":"value1","key2":"value2"}
/* decode */
$json_array = $json_obj->decode($json);
//$json_array will be an array("key1"=>"value1","key2"=>"value2")
May 7th, 2009 at 4:11 pm
[...] more details and examples on KAPISH. Share [...]
June 11th, 2009 at 10:52 am
Thanks for the useful info. It’s so interesting
September 10th, 2009 at 11:00 am
This blog makes me want to start my own blog.
February 12th, 2010 at 4:24 pm
Perfect – after struggling through the various json libraries looking for one that would likely be compatible with the majority of wordpress installs (for a plugin), I happened on this – exactly what I was looking for. Thanks!
May 1st, 2010 at 3:54 am
Wordpress is the best blogging platform ever. It is much better than Typepad and blogspot.”–
May 14th, 2010 at 3:44 am
i host 5 of my blogs on Blogspot and it is really good for beginners. but if you want something with more features, nothing beats wordpress~*,