Implemented toJson in DataMapper