add explicit .toJSON() calls to ctx.toJSON()
This commit is contained in:
parent
88fb4c841d
commit
14fe56e632
1 changed files with 7 additions and 2 deletions
|
@ -26,14 +26,19 @@ module.exports = {
|
|||
/**
|
||||
* Return JSON representation.
|
||||
*
|
||||
* Here we explicitly invoke .toJSON() on each
|
||||
* object, as iteration will otherwise fail due
|
||||
* to the getters and cause utilities such as
|
||||
* clone() to fail.
|
||||
*
|
||||
* @return {Object}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
toJSON: function(){
|
||||
return {
|
||||
request: this.request,
|
||||
response: this.response
|
||||
request: this.request.toJSON(),
|
||||
response: this.response.toJSON()
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue