try using toJSON()