Quick answer
Empty string "" and null are both valid in JSON but mean different things.
JSON Empty String vs Null
Empty string "" and null are both valid in JSON but mean different things. Using the wrong one can cause validation or logic errors.
Common causes
- API expects null but receives "".
- Schema requires a string but gets null.
- Treating missing and empty the same when they should differ.
How to fix
- Use null for absent or unknown values; use "" only when an empty string is meaningful.
- Check your schema or API docs for required type.
- Validate with a tool that checks types, not only syntax.
FAQ
- Is empty string valid JSON?
- Yes. "" is a valid JSON value.
- When should I use null vs empty string?
- Use null for missing/unknown; use "" when the value is explicitly an empty string.
Fix it now
Try in validator (prefill this example)