Closed dumpster-of-things closed 2 years ago
You're welcome, glaed you find the project useful!
Unfortunately, that input is not valid JSON. (I do find it bizarre that an official Google API is returning invalid JSON.) Trailing commas are not allowed in JSON, nor are strings that are delimited by single-quotes; strings have to use double quotes.
Here is the grammar/spec: https://www.json.org/json-en.html
Well heyll. In addition to your wonderful project, I also appreciate you- for turning my pretension into a learning opportunity (:
On Wed, Apr 27, 2022 at 12:21 PM Matt Holt @.***> wrote:
Closed #109 https://github.com/mholt/json-to-go/issues/109.
— Reply to this email directly, view it on GitHub https://github.com/mholt/json-to-go/issues/109#event-6508416270, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJVHKS47HSTS5VL4YRYEQK3VHFSQTANCNFSM5UN6QVYA . You are receiving this because you authored the thread.Message ID: @.***>
Issue easily reproduced using this JSON response example from Google: https://developers.google.com/maps/documentation/places/web-service/details#PlaceDetailsResponses
I've had issues with json-2-go breaking because of trailing commas and unecessary newlines/whitespace; and so I first copied the example JSON into my editor(sublime) in order to clean it up a bit... After hours of manually trying things like escaping the inner xml quotation marks - for example:
'<span class=\"nested xml Key\">nested xml Value</span>, ... , ... </span>'