SneakyLaiji / jodconverter

Automatically exported from code.google.com/p/jodconverter
0 stars 0 forks source link

Unable to parse document-formats.js with a newer version of json library #75

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
We're using jodconverter in a larger project with lots of dependencies. 
json-20080701.jar required by jodconverter is in conflict with other transitive 
dependencies we have (newer versions), which fail to parse document-formats.js

What steps will reproduce the problem?
Upgrade JSON dependency from version 20080701 to 20090211.

What is the expected output? What do you see instead?
Parsing document-formats.js that is bundled with 
jodconverter-core-3.0-beta-3.jar throws this exception:

org.json.JSONException: A JSONArray text must start with '[' at character 1
at org.json.JSONTokener.syntaxError(JSONTokener.java:410)
at org.json.JSONArray.<init>(JSONArray.java:113)
at org.json.JSONArray.<init>(JSONArray.java:157)
at 
org.artofsolving.jodconverter.document.JsonDocumentFormatRegistry.readJsonArray(
JsonDocumentFormatRegistry.java:43)
at 
org.artofsolving.jodconverter.document.JsonDocumentFormatRegistry.<init>(JsonDoc
umentFormatRegistry.java:35)
...

What version of the product are you using? On what operating system?
jodconverter-core-3.0-beta-3.jar

Please provide any additional information below.
Just removing the comments that precede the JSON array holding the 
configuration fixes the problem. It seems that JavaScript comments are not 
supported by the JSON format.

Original issue reported on code.google.com by zmeuld...@gmail.com on 16 Dec 2010 at 2:26

GoogleCodeExporter commented 8 years ago

Original comment by mirko.na...@gmail.com on 3 Apr 2011 at 1:16

GoogleCodeExporter commented 8 years ago

Original comment by mirko.na...@gmail.com on 3 Apr 2011 at 1:18

GoogleCodeExporter commented 8 years ago

Original comment by mirko.na...@gmail.com on 7 May 2011 at 3:34

GoogleCodeExporter commented 8 years ago

Original comment by mirko.na...@gmail.com on 7 May 2011 at 3:35