Skip to main content

Module decode

Module decode 

Source
Expand description

String decoding for JSON values parsed by super.

§Parsing vs decoding

The JSON parser ([super::parser]) is intentionally lenient: it accepts any structurally valid JSON string, leaving escape sequences and control characters verbatim inside a super::RawStr. Decoding is a separate step performed by this module.

Keeping these concerns apart means the linter can treat string-encoding problems as warnings rather than fatal parse errors. The caller receives both a best-effort string value and a list of Warnings describing what was wrong and where, which is enough information to suggest a corrected encoding to the user.

Enums§

Warning
The kind of Warning that can happen when decoding a &str.