robot icon indicating copy to clipboard operation
robot copied to clipboard

Report command fails for some textual content when the output format is JSON

Open psiotwo opened this issue 3 years ago • 2 comments

Having input.owl:

<rdf:RDF
     xmlns:obo="http://purl.obolibrary.org/obo/"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:xml="http://www.w3.org/XML/1998/namespace">
    <owl:Ontology rdf:about="http://test.org/test"/>

    <owl:ObjectProperty rdf:about="http://test.org/test#A">
        <obo:IAO_0000115>skos:Concept interferes with &quot;quoted text&quot;</obo:IAO_0000115>
    </owl:ObjectProperty>
</rdf:RDF>

and running

java -jar robot.jar report --input input.owl --output output.json

ends up with

-----------------
ERROR:      4
WARN:       0
INFO:       1
while parsing a block collection
 in 'reader', line 19, column 9:
            - "skos:Concept interferes with  ... 
            ^
expected <block end>, but found '<scalar>'
 in 'reader', line 19, column 44:
     ... skos:Concept interferes with \\"quoted text\\""
                                         ^

 at [Source: (StringReader); line: 19, column: 44]
Use the -vvv option to show the stack trace.
Use the --help option to see usage information.

Looks like some correlation inside the text field - removing the skos: prefix or the escaped double quotes makes things working. Also, textual output format (not JSON) works too.

psiotwo avatar Jun 22 '22 08:06 psiotwo

I have to say @psiotwo your tickets are great :) Thanks for that. Its a bit hard right now to find resources to fix such bugs, but, regardless, your issues are really well reported and helpful! Thanks!

matentzn avatar Jun 22 '22 12:06 matentzn

👍 Sure, clear ... will try to help resolving the stuff, as time permits ... .

psiotwo avatar Jun 22 '22 13:06 psiotwo

Checked, works as of 1.9.1.

psiotwo avatar Oct 31 '22 13:10 psiotwo