+1 for an option to pre-process JSON.

In particular it would be good to be able to attach JSON-LD context files 
to control the mapping of element to RDF nodes.


On Tuesday, 9 June 2020 04:45:19 UTC+10, Tim Smith wrote:
>
> One thought - can you pre-process the JSON as text?  I noticed you are 
> reading it in as a text file to begin with.  If the "null" values appear as 
> you have shown them 
>
> e.g. Location:null
>
> is it possible to do a string replace to change 'null' into another value 
> that will be retained in the conversion to triples?  After conversion, you 
> could find the values and set them accordingly with an Update query.
>
> On Sat, Jun 6, 2020 at 8:21 PM Holger Knublauch <hol...@topquadrant.com 
> <javascript:>> wrote:
>
>> One current option for such a scenario is to use SHACL-JS because that 
>> can be used to process arbitrary JavaScript. 
>>
>> https://www.w3.org/TR/shacl-js/
>>
>> But the wiring won't be easy. You'll basically have to define a SHACL-JS 
>> rule or function that takes the JSON as string (loaded via 
>> sml:ImportTextFile) and then does JSON.parse() from where you can do 
>> whatever you want in JavaScript.
>>
>> Another alternative is https://uispin.org/ui.html#json but I haven't 
>> tried whether this actually preserves the null values.
>>
>> We will have much better alternatives for JSON processing from 6.4 
>> onwards (beta coming soon).
>>
>> Holger
>>
>>
>> On 6/06/2020 19:50, MSV wrote:
>>
>> Hi, 
>> we do process JSON files to get into graph containers.
>> we first use sml:ImportTextFile and then sml:ConvertJsonToRDF to get the 
>> data.
>> the issue is, in case a json property is null, that value is not coming 
>> into the graph container.
>>
>> {
>> Name:xxxxx
>> Age:xx
>> Location:null
>> }
>> for this json, i would only get Name and Age into my graph, but i want 
>> Location value as well even if its null.
>>
>> is there a better way to process the jsons?
>>
>> -- 
>> 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 topbrai...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/topbraid-users/9cc2aacd-6cfc-4aaa-b9db-130ffa4d2185o%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/topbraid-users/9cc2aacd-6cfc-4aaa-b9db-130ffa4d2185o%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 topbrai...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/topbraid-users/574976a4-45d0-3943-0020-54c3cfc12a36%40topquadrant.com
>>  
>> <https://groups.google.com/d/msgid/topbraid-users/574976a4-45d0-3943-0020-54c3cfc12a36%40topquadrant.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 topbraid-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/25c619a1-c27e-43a1-be39-2827b5280c52o%40googlegroups.com.

Reply via email to