I need to parse JSON objects in PL/PgSQL function and transform them in arrays, or rowsets, or whatever iterable. Is there some sort of function or plugin to do this?
Google search is clogged with JSON serialization coming in Postgresql 9.2.
You'll probably want to use a procedural language add-on at this point, like PL/Perl, PL/Python or PL/V8 using the language of your choice's JSON support to produce the required data.
You could probably write a C extension library to add the desired functionality, but it's unlikely to be worth the effort when it's already possible via the PLs.
I'm hoping to see (and help to add) richer JSON manipulation functions in 9.3.