quicktype icon indicating copy to clipboard operation
quicktype copied to clipboard

Invalid Reverse Solidus '\' declaration when going from JSON to C#...

Open natiki opened this issue 6 years ago • 12 comments

Hi,

I wanted to convert the JSON from https://datahub.io/core/top-level-domain-names to some C# code.

However I got the above error when pasting the JSON into https://app.quicktype.io/. It appears that Unicode data is not parsed?

natiki avatar Jun 04 '19 03:06 natiki

you have to remove all the forward slash from the code then only it will work "/" this symbol

badguy1997 avatar Jan 28 '20 09:01 badguy1997

But JSON with information like Google's polyline will have those characters. How can we neglect that?

satyam90 avatar Aug 23 '20 07:08 satyam90

Consider running this regular expression as a data-cleanup step \\u[0-9a-z]{4} before handing it over to quicktype.

Goblin80 avatar Nov 27 '20 12:11 Goblin80

Lots of JSON APIs have this characteristic. Bitbucket's API is another one. This should probably be adjusted on the Quicktype side.

Edit: Unicode zero-width space ( \u200c ) causes this error message, too.

Here's a big JSON blob that'll trigger this error multiple times: https://bitbucket.org/!api/2.0/repositories/medicalinformatics/mainzelliste/pullrequests/143/activity

rianjs avatar Dec 09 '20 11:12 rianjs

+1, getting this in 2021 as well. I think this could be an easy fix from the Quicktype side instead of us cleaning up the JSON beforehand.

darkguy2008 avatar Jul 22 '21 06:07 darkguy2008

+1

kzorin52 avatar Oct 30 '21 17:10 kzorin52

+1

tbkj98 avatar Dec 02 '21 16:12 tbkj98

how can we use +1

HaroonAfzal22 avatar May 12 '22 04:05 HaroonAfzal22

As a workaround, I'm using this website https://jsonformatter.org/ to clean up these Invalid Reverse Solidus

chneau avatar Aug 22 '22 10:08 chneau

+1. Still not working with escaped unicode chars. Also what's with that error message, I did not even heard the word solidus before today.

xTachyon avatar Dec 24 '22 17:12 xTachyon

+1. 4 months later, this is a really inconvenient issues.

NotaRobot13 avatar Apr 29 '23 16:04 NotaRobot13

I have the same issue

BenJackGill avatar Sep 10 '23 13:09 BenJackGill