SANJIESAN WORLDJOURNAL / COLLECTIONS / SANJIESAN
SANJIESANTOOLS

SANJIESAN TOOLS / Typed fields

JSON false and the text “false” are different values

A spreadsheet or form export can turn a flag into text. If the next step treats any non-empty text as enabled, the word false may do the opposite of what a reviewer expects. Keep the field’s type and meaning explicit, and check the boundary with local samples before it can trigger an external action.

Define the flag’s type

For a mock resource workflow, choose a harmless flag such as includeInDraft and state that the contract expects a boolean. RFC 8259 distinguishes JSON booleans from strings. Write the expected values in the contract instead of using a visual checkbox alone as evidence. Keep missing, invalid and explicitly false as different cases when your process needs that distinction. A field’s friendly label does not explain what the imported bytes actually represent.

Compare a typed and text pair

Create one local sample with boolean false and another with the quoted string false, changing nothing else. Write which should be accepted and which should be rejected or routed for review. Inspect both type validation and any later condition that uses the field. Avoid a broad truthy check when the contract requires a specific boolean. A display that prints both values the same way can hide the distinction, so inspect a type-aware representation as well.

Keep the source conversion deliberate

If a supplier can only provide text, agree a narrow mapping with explicit allowed spellings and an error route for anything else. Retain the original input and the converted value in private review evidence where appropriate. Do not silently interpret an unknown word as approval or a publish command. This check describes a typed boundary for a future workflow; it is not a live automation test and does not turn a sample flag into actual commercial authorisation.

Sources & further reading

LET’S MAKE WHAT COMES NEXT

Have a product, a resource or an idea?

For suppliers, creators and brands. Tell us what you have in mind and where you work.

Start a conversation ↗