Skip to content

Conversation

@mcollina
Copy link
Member

@mcollina mcollina commented Feb 1, 2018

As titled. We removed it from fastify long ago anyway.

Copy link
Member

@delvedor delvedor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mcollina mcollina merged commit 36b8e39 into master Feb 1, 2018
@mcollina mcollina deleted the no-safe-stringify branch February 1, 2018 09:06
@SimenB
Copy link
Member

SimenB commented Mar 26, 2018

That means there's no way to handle circular objects :( Thoughts on that? I can just use an old version, that makes me a bit sad, though

@mcollina
Copy link
Member Author

@SimenB you should specify a schema, or just use fast-safe-stringify  yourself and then send the JSON down.

@SimenB
Copy link
Member

SimenB commented Mar 26, 2018

Right now we have an extras field on the object (we use this for a logger) which can be whatever, everything else logged is a schema.

Passing just that part through fast-safe-stringify manually should work though. Would I have to send the result from that through JSON.parse before passing it to this module to avoid double-escaping?

EDIT: I can figure that out myself, never mind 🙂

@mcollina
Copy link
Member Author

You can possibly just add a toJSON function on that object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants