TopicActive Directory →
⌚ About 2 min read
Validate JSON syntax, make it readable, and locate errors before an import or API call.
Before you start
Work on a copy or a controlled test when the change can affect production. Keep timestamps, screenshots and the previous configuration so the result can be compared.
Step by step
- Copy only the JSON to inspect and remove secrets or access tokens.
- Test it with the BAOI JSON Formatter & Validator.
- Fix the first reported issue: comma, quote, brace, or unexpected type.
- Validate again and compare the structure with the application or API schema.
- Keep a minified version only when the target system requires it.
Validation
Repeat the original test after the change and confirm that the expected service works without creating a new regression. Document the final state.
JSON / JWT: valid syntax does not mean trusted data
Technical checkpoints
- JSON requires double quotes for strings/keys and standard JSON allows neither comments nor trailing commas.
- A JWT is three base64url segments header.payload.signature; decoding header/payload does not verify the signature.
- Claims exp, nbf, iss and aud must be interpreted in the context of issuer and signing key.
JWT example
Decode locally for inspection only; never paste a real token into a third-party service.
header.payload.signature
# Base64URL != standard Base64: -/_ and padding can differTopic-specific pitfalls
- Well-formatted JSON can still be semantically invalid for the target API.
- Seeing alg=none or an unexpected algorithm without checking validation policy is a security warning.
How to validate
- JSON is validated by the parser and, when available, by the expected schema.
- A JWT is considered valid only after cryptographic verification plus issuer, audience and temporal claims checks.