path: Fix unconditional use of `serde` in `path` crate (#61037)

Release Notes:

- N/A or Added/Fixed/Improved ...
b5fa67cfb3Lukas Wirth committed on 7/15/2026, 12:17:10 PM· committed by GitHubparentf751e78
1 file changedLine totals unavailable