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.
|
* 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}
|
* @return {Object}
|
||||||
* @api public
|
* @api public
|
||||||
*/
|
*/
|
||||||
|
|
||||||
toJSON: function(){
|
toJSON: function(){
|
||||||
return {
|
return {
|
||||||
request: this.request,
|
request: this.request.toJSON(),
|
||||||
response: this.response
|
response: this.response.toJSON()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue