[ARCHIVED] BUG Report: Special Characters inside Returned JSON String
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I used curl to get a list of discussion topics (announcements).
The data was successfully returned. However, the returned string contains special characters, which BBEdit shown as a red reversed question mark.
There is one before the JSON string. This is fine, because I don't need the string before the JSON string.
There is another one inside the JSON string.
This one breaks the string. As I did a regex search for \[\{.* and it stops at the reversed question mark. If I do regex search for \[\{.*\}\], it will fail the search, because the reversed question mark is there.
Any help appreciated!
Edit:
When I copy and paste the reversed question mark to the search box of BBEdit, it is shown as \x{0D}, a carriage return.
I have no idea why the carriage return appears in the middle of the JSON string. It looks like one line of the string that is supposed to appear before the JSON string is inserted between the ID number.
it looks like the string after the first reversed question mark:
Edit 2:
I can first remove the Carriage Return and then do the regex research. But still, there are some extra numbers/spaces (the highlighted part in the screenshot below) inserted in the id number. The ID number is supposed to be "12047307". But "100 23887 " is inserted between "120" and "47307".
Edit 3:
The string inserted has random length. This time, it is this:
Another try:
It is always inserted at the same place though.
Looks like it is a bug?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Adding "-sS" to use silent mode has resolved the issue for me. Curl now returns only the JSON data.
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.