Skip to content

Conversation

@HeroponRikiBestest
Copy link
Contributor

There is one thing I'd like your advice on, if you have any. I thought i was having encoding issues, as the plus sign was turning into \u002B, but it turns out this specific character is supposed to be treated this way.

dotnet/runtime#35281

Should I

  • Replace the plus sign in any protections with a different character
  • Do a regex replace for \u002B with + on the output
  • Try and use one of the UnsafeRelaxedJsonEscaping options

I'm not sure what's best, since apparently

If you have a JSON string "\\u002B", this search-and-replace will result in the JSON string "\+", which corrupts the JSON payload.

So, doing some kind of workaround doesn't seem ideal.

@HeroponRikiBestest
Copy link
Contributor Author

HeroponRikiBestest commented Nov 8, 2025

Actually, it might not be the responsibility of the json output program to do anything. Looking at "dedicated" json programs, they all seem to display these as plus signs, since that's the way they're supposed to be output to json.

image

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