I made this to work with Zapatos, which uses Postgres JSON extensively.<p>Note that there is a proposal to make this possible with native JSON.parse and JSON.stringify, which would be awesome: <a href="https://github.com/tc39/proposal-json-parse-with-source">https://github.com/tc39/proposal-json-parse-with-source</a>