JSON Stuff

From Filtered Push Wiki
Jump to: navigation, search

Some resources:

JSON-LD Playground JSON-LD validator. But it is a javascript application, so your json has to include all(?) the referenced contexts. I don't yet know how to do this.

Stian Soiland-Reyes' owl2json converter

OpenAnnotation JSON-LD context file for serialization as documented in the OA data model

JSON-LD context file for OAD extension of OA file produced on stdout by

 java -jar owl2jsonld-0.2.1-standalone.jar -i   http://filteredpush.org/ontologies/oa/oad.rdf

JSON-LD context for dwcFP ontology file produced on stdout by

 java -jar owl2jsonld-0.2.1-standalone.jar -i http://filteredpush.org/ontologies/oa/dwcFP.owl 

Friendly translator among RDF formats including JSON-LD

LoreStore OA validator which accepts JSON-LD valid for the OA context.

The code below should, more or less, be the OA recommended JSON-LD serialization semantically identical to the output upon applying the Generate button on standalone client demo (omitting the annotator metadata). That demo assigns a number of URIs to resources that may not need them. Will Jackson take the code below and make it rdfxml??? If FP can generate this code based only on the JSON-LD context files (e.g. via Jackson???) then less (no?) compile time code may be in play ??? (TODO: understand how to reference multiple JSON-LD contexts.)

    "@context": "http://plazi2-vm.cs.umb.edu/oad-context-20150119.json",
    "@type": "oa:Annotation",
    "oa:has_Target" : {
	"@type": "oa:SpecificResource",
	"oa:hasSelector" : {
            "oa:hasSource" : {
		"@type" : "oad:AnySuchResource" ,
                "dwcFP:collectionCode" : "NEBC",
		"dwcFP:catalogNumber" : "barcode-00339174",
		"dwcFP:institutionCode" : "Harvard University"
    "oa:hasBody" : {
	"@type" : "dwcFP:Identification",
	"dwcFP:scientificName" : "Dichanthelium acuminatum subsp. columbianum",
	"scientificNameAuthorship" : "(Scribner) Freckmann and Lelong",
	"name" : "Walter T. Kittredge",
	"dateIdentified" : "1991"
    "oad:hasEvidence" : {
	"@type" : "oad:Evidence", 
	"chars" : "Example"