mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-10-21 06:52:18 +02:00
The case-folding, null-tolerant struct decoder (`go_deserialize!` with `field_name`, `KeySeed`, `Update` and `Field`) lived in `core::lyrics::json` although downloads, metadata and resolver payloads depend on it. Move it unchanged to a neutral `core::json` module and name the macro after its behavior, `lenient_deserialize!`. All users are inside spotiflac-core, so no compatibility re-export is kept. The lyrics module keeps only its surrogate-normalizing `decode` helper. `field_name` is now public so the extension registry decoder reuses it instead of its own copy of the same folding. Its matcher folds the key once and compares ASCII case-insensitively against the wire name, which a new test checks against the previous matcher on edge inputs (empty, long s, Kelvin sign, combining marks, non-ASCII letters, BOM, NUL). The visitor's `expecting` text is unchanged so decode errors stay byte-identical.