code: function reqToJSON () {
    const {ip, method, url, headers} = this
    const userAgent = headers ? headers['user-agent'] : void (0)
    return {ip, method, url, userAgent}
  }
docs: ---- using toJSON custom serializers