JSON False or the Text “false”? Validate State Types Before Mapping
A source record contains the text “false”, but a receiving workflow treats the state as enabled. The visible word looks convincing while the field's type has changed. Diagnose the encoded value and the agreed state contract before changing an alarm label, dashboard colour or equipment mapping.

A Boolean false and a string containing the letters false are different JSON values. Accept and convert state fields through an explicit, tested contract.
1. Specify the state before its display
Start with the meaning of the field. Is it a measured condition, a command request, a quality flag or an availability indication? Document the accepted type, the source's meaning for each permitted value and how uncertainty is represented. A convenient display label does not supply those definitions.
Use the ProSight Software platform overview to begin the deployment discussion, then confirm the actual supported data route and mapping scope. This article describes integration acceptance checks. It does not claim that every ProSight Software plan includes a particular schema validator or automatic type-conversion feature.
RFC 8259 distinguishes Boolean values from strings and numbers. JSON Schema's Boolean reference explicitly accepts true and false while rejecting values such as 0, 1 and a quoted string as Boolean instances. A parser successfully reading the document therefore does not establish that every field has the type the application requires.
2. Inspect the producer and each transformation
Keep an unchanged, sanitised source sample. Check the parsed field type at the first receiving boundary, then follow any mapping, conversion and export step. A later transformation can introduce text even when the original source produced a Boolean correctly.
Record whether conversions are permitted. A project may accept a documented source representation through a specific adapter, but the allowed input set and error policy must be written down. Avoid a broad rule that treats any non-empty text as enabled or converts every unrecognised state to false. Either approach can hide malformed input behind a plausible state.
Keep operational state and data quality separate. A missing or invalid flag is not proof that a physical condition is inactive. For control or safety-related applications, the responsible engineers must define the appropriate behaviour; a generic telemetry mapping is not a certified safety function.

3. Build a discriminating fixture
In a hypothetical isolated test, submit one record with enabled set to the Boolean false and a second with enabled set to the string “false”. Give them distinct test identifiers and retain the original encoded samples. Under a contract requiring a Boolean, the first can pass the type check while the second needs the agreed rejection or explicit conversion route.
Add Boolean true, numeric zero, an absent member and an unexpected string. Check both the recorded validation outcome and the final visible state. A test that looks only for the word false in a display can miss a conversion error in an intermediate stage.
Test input | Contract question |
Boolean false | Is the valid inactive state retained? |
String “false” | Is text rejected or explicitly converted? |
Numeric zero | Is a numeric convention actually permitted? |
Missing member | Is uncertainty retained separately? |
Repeat the fixture after any source firmware, driver or mapping change. Keep a small versioned acceptance set with the agreed expected outcomes. This makes the boundary test reproducible without needing to generate an unsafe physical condition on operating plant.
4. Common mistakes to remove from the handover
Do not infer a type from a spreadsheet cell's appearance. Do not accept a schema pass from an unrelated field or a sample that exercises only the positive state. Do not silently coerce malformed values to a default merely to keep a trend or status panel populated.
The related finite telemetry validation guide deals with invalid numeric results. Use separate tests for numeric validity and Boolean state types so that correcting one class of error does not conceal another.
Is a quoted Boolean always unusable?
It may be a valid string under the source contract. The question is whether the receiving field expects that representation and has an agreed conversion. Preserve the source value while applying that explicit policy.
Does a valid Boolean prove the sensor condition?
No. Type validation is one boundary check. Source identity, freshness, quality and the meaning assigned to the state still require verification.
5. Recommended related solutions
For mappings involving controllers, gateways or multiple source conventions, discuss a ProSight Software engineered integration assessment. Provide redacted samples, field definitions, equipment versions and the expected inactive, active and unknown outcomes.
Ask the project team to demonstrate the fixture through the actual agreed route and retain its results. Confirm what is included in the proposed scope before relying on a validation or conversion behaviour.
Primary references: JSON values in RFC 8259 and the JSON Schema Boolean reference.
Need help with your application?
Send the exact equipment and interface versions, the required outcome and a sanitised example. Ask for a confirmed scope and an acceptance check suited to your application.
Phone: 1800 560 854



.png)
Comments