RDF/JSON Serializer incorrectly serializes a bnode object which does not appear 
elsewhere as a subject
------------------------------------------------------------------------------------------------------

                 Key: CLEREZZA-437
                 URL: https://issues.apache.org/jira/browse/CLEREZZA-437
             Project: Clerezza
          Issue Type: Bug
            Reporter: Hasan
            Assignee: Hasan


the following test fails:
                mGraph = new SimpleMGraph();
                mGraph.add(new TripleImpl(new 
UriRef("http://example.org/node1";),
                                new UriRef("http://example.org/prop1";), new 
BNode()));
                SerializingProvider provider = new RdfJsonSerializingProvider();
                ByteArrayOutputStream serializedGraph = new 
ByteArrayOutputStream();
                provider.serialize(serializedGraph, mGraph, 
"application/rdf+json");
                Assert.assertTrue(serializedGraph.toString().contains("_:"));

resolving this issue should also fix the incorrect format of bnode id. 
currently a bnode id resulting from this serializer contains a number after _: 
which is not allowed as a start character of the id. see 
http://n2.talis.com/wiki/RDF_JSON_Specification which refers indirectly to 
http://www.w3.org/TeamSubmission/turtle/ (current version of this spec is 
"Turtle - Terse RDF Triple Language, W3C Team Submission 14 January 2008"). The 
relevant section is http://www.w3.org/TeamSubmission/turtle/#nodeID

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to