I was just trying to use https://mholt.github.io/json-to-go/ and found that it seemed to be unable to parse anything I was pasting into it, despite it being valid JSON. Even more strange was that it seemed to be complaining about whitespace characters being present in the input (which should be fine), but then if I typed the same thing by hand (with the same whitespace) it liked it fine. Even weirder was that if I started with a failing case, and edited out all of the whitespace, it liked it, but then if I manually inserted a space character, it broke again.
Eventually I noticed that when I cut-and-pasted JSON from a terminal window (on MacOS) into the web entry box, it was also copying over the formatting (coloring, text size, etc). However, if I used Command-Option-Shift-V to paste just the text without any formatting, lo and behold it was able to parse it just fine.
I can only assume there's something about the rich-text entrybox being used and how it returns data to the underlying code that causes weird characters to be introduced only if there is formatting involved and there are whitespace characters present.
Perhaps this should be changed to use a non-rich-text entrybox of some sort, or to filter out whatever special characters the text box itself is introducing into things?
I was just trying to use https://mholt.github.io/json-to-go/ and found that it seemed to be unable to parse anything I was pasting into it, despite it being valid JSON. Even more strange was that it seemed to be complaining about whitespace characters being present in the input (which should be fine), but then if I typed the same thing by hand (with the same whitespace) it liked it fine. Even weirder was that if I started with a failing case, and edited out all of the whitespace, it liked it, but then if I manually inserted a space character, it broke again.
Eventually I noticed that when I cut-and-pasted JSON from a terminal window (on MacOS) into the web entry box, it was also copying over the formatting (coloring, text size, etc). However, if I used Command-Option-Shift-V to paste just the text without any formatting, lo and behold it was able to parse it just fine.
I can only assume there's something about the rich-text entrybox being used and how it returns data to the underlying code that causes weird characters to be introduced only if there is formatting involved and there are whitespace characters present.
Perhaps this should be changed to use a non-rich-text entrybox of some sort, or to filter out whatever special characters the text box itself is introducing into things?