Skip to content

Escape raw string dictionary keys#1198

Open
AbodiDawoud wants to merge 1 commit into
SwiftyJSON:masterfrom
AbodiDawoud:codex/source-code-improvement
Open

Escape raw string dictionary keys#1198
AbodiDawoud wants to merge 1 commit into
SwiftyJSON:masterfrom
AbodiDawoud:codex/source-code-improvement

Conversation

@AbodiDawoud

Copy link
Copy Markdown

I fixed raw string output for dictionaries when castNilToNSNull is enabled.

Dictionary keys in this path now use the same quote and backslash escaping that nested string values already used, so keys containing " or \ do not produce invalid JSON.

Validation:

  • git diff --check
  • swift build --build-tests
  • swift test --filter RawTests
  • swift test

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.

1 participant