Skip to content

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

@psiotwo

Description

@psiotwo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions