is this used outside of `jsonify`? (I'd recommend calling it `toJSON()` to line up with JavaScript's `.toJSON()`