WORKED EXAMPLE · SYNTHETIC INPUT
Check strings and booleans when converting JSON to YAML
Configuration values such as "0012" and "yes" can be misread if a conversion changes their types or a downstream parser uses different YAML rules.
阅读中文版
These inputs demonstrate reproducible behaviour; they are not customer incidents or evidence of real usage.
Reproducible input
{"code":"0012","enabled":false,"items":["yes","no"]}Steps
- Load the sample and convert it to YAML.
- Check that code is preserved as a string with leading zeroes and enabled remains a boolean.
- Parse the result with the same YAML library and version used by your application, then compare the resulting values and types.
Expected result
The converter emits YAML from the string code, boolean enabled and ordered items array. A duplicate-key or unsafe-integer warning blocks conversion before parsing.
Limits and manual checks
Text may be quoted or styled differently while representing the same value. YAML versions and parsers differ. Do not treat visual similarity as proof of compatibility, and do not reformat signed payloads.
Technical reference