Privacy & safety when working with JSON
JSON payloads often contain sensitive data. These tips help you avoid accidental leaks when debugging or sharing examples.
What to remove before sharing
- API keys, tokens, session IDs, cookies
- Passwords and secrets
- Personal data: emails, phone numbers, addresses, names, device identifiers
- Internal URLs and hostnames
How to sanitize examples
- Replace real values with placeholders like
"REDACTED"
- Keep the shape: preserve keys and types so debugging stays accurate
- Use short examples: include only the minimal fields needed to reproduce
Be careful with logs
Application logs often capture full request/response bodies. Treat logs as sensitive and avoid pasting raw production data into public places.
Related: Privacy policy · Escape JSON strings