Semantic JSON capability in TopBraid?

24 views
Skip to first unread message

Steve Ray (CMU)

unread,
Jan 5, 2018, 6:02:43 PM1/5/18
to topbrai...@googlegroups.com

Hi,

            With the increasing appearance of JSON as an exchange encoding, I was hoping TopQuadrant would release a “Semantic JSON” capability, analogous to the Semantic XML capability you already offer. I have been working on recreating this on my own, but am realizing it is not as easy as I had hoped.

 

Is this being considered? As a fall-back, I tried using open source tools to convert my JSON into XML and then use your Semantic XML. I was not successful.

 

 

- Steve

 

Steven R. Ray, Ph.D.

Distinguished Research Fellow

Carnegie Mellon University

NASA Research Park

Building 23 (MS 23-11)

P.O. Box 1
Moffett Field, CA 94305-0001

Email:    stev...@sv.cmu.edu

Phone: (650) 587-3780

Cell:      (202) 316-6481

Skype: steverayconsulting

cid:A9ED74CE-68DA-4276-847C-3C08B21B97C0@wv.cc.cmu.edu

 

image001.png

Holger Knublauch

unread,
Jan 5, 2018, 6:42:15 PM1/5/18
to topbrai...@googlegroups.com
Hi Steve,

we acknowledge that JSON processing is very important and have just added new capabilities to 5.5.

I assume you are aware of the SWP SWON namespace, used primarily for generating JSON from RDF. See

    http://uispin.org/swon.html

This includes some basic facilities for parsing JSON too:

    http://uispin.org/swon.html#parse

The RDF triples created from JSON may be too verbose for some use cases, so we have just added something into the ui: namespace itself for 5.5:

    http://uispin.org/ui.html#json

The latter approach allows you to selectively walk through a JSON structure using SPARQL.

All these are SWP-related capabilities because in our experience, JSON processing is part of some other processing steps, in particular web service calls.

What would your requirements be? Do you have .json files in your workspace that you want to open similar to Semantic XML?

Regards,
Holger

PS: If you have any control over the JSON that is used, obviously JSON-LD would be the ideal solution for RDF interoperability. Custom @contexts give you quite some flexibility.
--
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 topbraid-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ralph TQ [Gmail]

unread,
Jan 5, 2018, 6:46:15 PM1/5/18
to topbrai...@googlegroups.com
See http://uispin.org/swon.html

We’ve had this support for a number of years.

Ralph Hodgson

<image001.png>

 

Steve Ray

unread,
Jan 5, 2018, 7:12:53 PM1/5/18
to topbrai...@googlegroups.com

Thanks, Holger,

This might really help. My application is one where we have been providing a service via the TBL SPARQL endpoint, and we’ve had the clients send SPARQL queries in which they call various SPIN functions which are the underlying functions of SPARQLMotion scripts. The scripts have been parsing XML (using Semantic XML against a known standard that provides the .xsd files), then invoking SPINMap to transform the data into our own native schema.

 

Now, we’d like to do the same with JSON, so I have a number of questions:

1.    Can I continue to use SPARQLMotion with the swon library?

2.    If not, and I migrate to SWP, is it still possible to invoke our services via the SPARQL endpoint? In other words, are there function calls that can be embedded within SPARQL queries to the endpoint? The client code is not set up to directly make web service calls.

 

Just to give you a feel for the interface we offer, a sample call to our endpoint currently is:

 

SELECT ?response WHERE {BIND (<http://epic/scripts/triplestoreOperations#XMLInsert2>("""<?xml version="1.0" encoding="UTF-8" standalone="yes"?>…<lots of XML>""") AS ?response)}

 

 

- Steve

 

Steven R. Ray, Ph.D.

Distinguished Research Fellow

Carnegie Mellon University

NASA Research Park

Building 23 (MS 23-11)

P.O. Box 1
Moffett Field, CA 94305-0001

Email:    stev...@sv.cmu.edu

Phone: (650) 587-3780

Cell:      (202) 316-6481

Skype: steverayconsulting

cid:A9ED74CE-68DA-4276-847C-3C08B21B97C0@wv.cc.cmu.edu

 

image001.png

Holger Knublauch

unread,
Jan 5, 2018, 7:38:38 PM1/5/18
to topbrai...@googlegroups.com


On 6/01/2018 10:12, Steve Ray wrote:

Thanks, Holger,

This might really help. My application is one where we have been providing a service via the TBL SPARQL endpoint, and we’ve had the clients send SPARQL queries in which they call various SPIN functions which are the underlying functions of SPARQLMotion scripts. The scripts have been parsing XML (using Semantic XML against a known standard that provides the .xsd files), then invoking SPINMap to transform the data into our own native schema.

 

Now, we’d like to do the same with JSON, so I have a number of questions:

1.    Can I continue to use SPARQLMotion with the swon library?

2.    If not, and I migrate to SWP, is it still possible to invoke our services via the SPARQL endpoint? In other words, are there function calls that can be embedded within SPARQL queries to the endpoint? The client code is not set up to directly make web service calls.

 

Just to give you a feel for the interface we offer, a sample call to our endpoint currently is:

 

SELECT ?response WHERE {BIND (<http://epic/scripts/triplestoreOperations#XMLInsert2>("""<?xml version="1.0" encoding="UTF-8" standalone="yes"?>…<lots of XML>""") AS ?response)}


Yes this should work, either with ui:Functions or functions backed by SPARQLMotion scripts (which then use sml:CreateSWPDocument internally). In the case of 5.5 (which is BTW scheduled for quite soon), you could call <ui:json ui:str="{= ?json }">... where ?json is the parameter from the client. Or use the corresponding mechanisms of swon:parse.

Holger
Reply all
Reply to author
Forward
0 new messages