Database: add toJSONString() method