-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Problem Statement
Hi team,
I’m using toon-python to encode tool outputs into TOON. I often receive payloads in JSON format where missing values appear as null, for example:
{
"abc": null,
"xyz": null
}
The only workaround is converting null → None manually, or converting null into "null" (string), which changes the meaning of the data.
Proposed Solution
Request
Could toon-python support one of the following?
Provide a helper function such as:
toon_format.encode_json(json_string: str)
that parses JSON and converts null → None before encoding.
Or provide a utility:
toon_format.loads(json_string)
similar to json.loads(), but TOON-friendly.
Or document clearly that None must be used and provide an official conversion snippet.
Why this matters
This is a very common integration case when data originates from:
- LLM tool outputs
- APIs
- logs / stored JSON payloads
- Having built-in support would prevent frequent encoding failures and improve developer experience.
Alternatives Considered
No response
SPEC Compliance
No response
Additional Context
No response