JSON String vs Boolean Type Mismatches
TL;DR: Values like "true" and "false" are strings, not booleans.
Many serializers will refuse to bind them to bool properties or will treat them differently than you expect.
The Problem
It is easy to assume that "true" and "false" behave like real boolean values, but JSON distinguishes
between strings and booleans:
{
"featureEnabled": "true", // string
"featureEnabled": true // boolean
}
Depending on your framework:
"true"might be rejected during model binding toboolproperties.- Client-side validation may pass while server-side deserialization fails.
- Libraries that perform loose conversions may hide the mismatch until a refactor or configuration change.
Spot Suspicious String Values
The JSON Runtime Checker
flags string values that look like booleans, numbers, or null as risky patterns so you can
fix the type mismatch before it reaches production.
Check Your JSON for Type Mismatches
Paste your payload into the JSON Runtime Checker
to highlight suspicious string-typed values like "true", "1", and "null".