YAML-PP-p5
YAML-PP-p5 copied to clipboard
Anti-issue: YAML::PP parses JSON that all the other perl JSON modules can't!
So yeah, this is an anti-issue - I discovered recently that JSON is "a subset of YAML 1.2"; and then discovered YAML::PP. In short: Thank you. YAML::PP doesn't bomb on JSON that is produced with ham-fisted UTF-8 encoding.
It appears that one company in particular that distributes a data feed has somehow "switched on" interpreting all data ingested as UTF-8, even when it wasn't UTF-8 encoded. Imagine interpreting the header of a ZIP file as Unicode. The result is corrupted garbage, and it isn't standards compliant.
Example:
{"Subject": "CN=\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0531/OU=\ufffd\ufffd\u01b4\ufffd/OU=\u027d\ufffd\ufffd\ufffd\ude64\ufffd\ufffd\u0467/O=sdlg" }
Nothing else in Perl land seems to be able to parse the above JSON document. YAML::PP does, as of v0.005.
My request: Please let this continue to be the case. If you do end up adding validation of unicode character sequences, give folks an option to turn it off.