Hi Nensi,

the SHACL validation produces an RDF graph which we represent programmatically 
as a Jena Graph object (or Model). When you use the command line tool that 
graph would be serialised as Turtle. One way to turn such output into JSON 
would be re-save the Graph into JSON-LD format using the Jena API. However, the 
output may not be in the exact format that you’d like. An alternative is to run 
a SPARQL SELECT query over the result and use the SPARQL result format as 
output. Basically write a query that fetches the sh:focusNode, the sh:value and 
sh:sourceConstraintComponent of each validation result.

Not sure if this helps as I am not sure what experience you have, e.g. whether 
you rely on the command line of can write Java programs.

Holger


> On 19 Feb 2023, at 7:29 pm, Nensi Skenderi <[email protected]> wrote:
> 
> Hello, 
> 
> First I want to thank you about the amazing work on implementing this library.
> 
> I am currently working with Quadrant Shacl.
> What I want to achieve is to be able to extract from the validation report 
> the following:
> 
> 1- the node
> 2- the triple
> 3- the constraint
> 
> in JSON format 
> 
> I was checking the code but I could not find a formatter. Do you know any 
> solution about this?
> 
> Thanks a lot,
> Nensi
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TopBraid Suite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/4f6c454a-8eaa-41e5-a644-f187a1858f8dn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/4f6c454a-8eaa-41e5-a644-f187a1858f8dn%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/AFE3D72F-B823-4EE9-AAD7-E5F4AE0A85C3%40topquadrant.com.

Reply via email to