Skip to content

Conversation

@svenmuennich
Copy link
Member

Before the performance refactoring added via #2 it was possible to decode a JSON value that contained nested Data values, which themselves contained valid JSON:

let json = JSON([
    "root": #"{"foo": "bar"}"#.data(using: .utf8)!
])

This is an edge case, since it can only happen if the JSON content was constructed in code or at runtime (not when decoding e.g. from a String), but we use this feature ourselves.

#2 broke that feature. This PR fixes it.

@felixbrucker felixbrucker self-assigned this Jul 29, 2022
@felixbrucker felixbrucker self-requested a review July 29, 2022 11:08
Copy link

@felixbrucker felixbrucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@felixbrucker felixbrucker merged commit 4415ae6 into master Jul 29, 2022
@felixbrucker felixbrucker deleted the svenmuennich/fix-resolving-of-nested-data branch July 29, 2022 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants