← 返回 stripe 的题目列表Debug: SnakeYAML Boolean-like Scalar Parsing
类型:online_judge
Debug SnakeYAML — parsing flag: on
You maintain Java code that parses YAML using SnakeYAML. A test case fails or behaves unexpectedly for the following YAML:
flag: on
Tasks
Given a SnakeYAML parsing snippet (provided in the interview), identify why flag: on fails, throws, or produces an unexpected type/value.
Fix the issue without breaking other YAML behaviors. Explain whether your fix changes YAML version, parser configuration, schema/resolver, or type conversion logic.
Provide at least 3 regression-test YAML inputs (covering on/off/yes/no/true/false, etc.) and the expected parsed results.