couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Stephenson <b...@cherrypc.com.INVALID>
Subject exporting text to JSON hangs on %27 character
Date Sat, 06 Mar 2021 20:44:44 GMT
I’m using Perl to convert old CGI.pm “save” files to JSON that look like this:

c_name=Joseph%20Semeister
c_address1=9445%20Sofa%27s%20Mill%20Rd
c_address2=
c_city=Red%20Tree
c_state=PA
c_zip=17356
=

and loading them into a CouchDB (v. 3.1.1) with curl but files with that " %27 “ string
hang with an error:

malformed JSON string, neither tag, array, object, number, string or atom, at character offset
0 (before "(end of string)")

I’ve narrowed down the issue to that “%27” and I can remove that like so:

	$myJSON =~ s/'//;

But that doesn’t preserve the original text string "9445 Sofa’s Mill Rd”.

I’m not savvy enough to call this a “bug” but this doesn’t break on other encoded
text like “%20”. 

Anyone got any suggestions for how I might work around this?

--

Kindest Regards,

Bill Stephenson






Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message