upgraded version of FPC JSON support - almost a drop-in replacement of fpjson