mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-01 14:59:50 +00:00
BasicJsonParser tokenizes JSON into map entries (key-value pairs) and list entries (values). As part of this, any escaped characters are unescaped. When the values are themselves maps or lists, they are tokenized again. This multi-pass approach with every pass performing unescaping causes the escaped characters to be handled incorrectly. This commit updates BasicJsonParser to leave escape characters in place when its parsing characters nested within a list or map. The escaping is now only considered when parsing a scalar value. This ensures that unescaping is only performed once. Fixes gh-51907