Yaml should recognize escaped slashes ("\/" -> "/") itself
Closed this issue · 3 comments
GoogleCodeExporter commented
I want to read the (twitter-like) api of identi.ca.
A typical dokument looks like this: http://identi.ca/api/users/show/rms.json
This seems to be valid json (and hence yaml) as per http://www.jsonlint.com/
But if i load() it with SnakeYaml, an Exception occurs:
found unknown escape character /(47)
in "<reader>", line 7, column 33:
"profile_image_url": "http:\/\/avatar.identi.ca\/94029-48-20 ...
Replacing all \/ with / in the input resolves the problem – i expected Yaml
to do this unasked (instead of totally breaking down).
Besides, i’m using SnakeYaml version 1.7 on Ubuntu 10.04 with OpenJDK build
16.0-b13.
Thanks for this great library!
Original issue reported on code.google.com by Dennis.H...@gmail.com
on 4 Nov 2010 at 11:23
GoogleCodeExporter commented
JSON is a subset of YAML 1.2
SnakeYAML implements YAML 1.0 and 1.1
As far as I know there is no parser which implements YAML 1.2 at the moment.
The coming release (1.8) will not deliver YAML 1.2 implementation. The work has
started but it will take some time
(http://code.google.com/p/snakeyaml/source/clones)
Original comment by py4fun@gmail.com
on 5 Nov 2010 at 10:11
- Added labels: ****
- Removed labels: ****
GoogleCodeExporter commented
So it’s more or less my fault. Thanks for the clarification!
Original comment by Dennis.H...@gmail.com
on 6 Nov 2010 at 1:09
- Added labels: ****
- Removed labels: ****
GoogleCodeExporter commented
I have put some info to the documentation:
http://code.google.com/p/snakeyaml/wiki/Documentation?ts=1289207595&updated=Docu
mentation#JSON_support
Original comment by py4fun@gmail.com
on 8 Nov 2010 at 9:17
- Changed state: Done
- Added labels: ****
- Removed labels: ****