Hotfix: use json_encode to store object in hstore