restify-safe-json-formatter

JSON →
library 0.4.10 ·javascript maintenance
verified Jun 4, 2026

A restify formatter that unicode-escapes <, >, and & characters in JSON responses as \u003c, \u003e, and \u0026 respectively, preventing browsers from interpreting JSON as HTML. Version 0.4.10 is the latest release, last updated in 2018. It requires Node.js >=10 and npm >=6.4.1. This package is a lightweight alternative to manually escaping JSON for XSS prevention, specifically designed for Restify servers.