If you wait for 9.2 you can say
SELECT query_to_json('select x as b, x * 2 as c from generate_series(1,3) x',false);
http://people.planetpostgresql.org/andrew/index.php?/archive...I can't find the link now, but the reverse (insert, update from json) I remember also to be possible.