Table of Contents
This directory contains the following coverters:
- json2yaml
- jsonld2turtle
- turtle2jsonld
- yaml2json
- yaml2turtle
And the following validators:
- jsonvalidator
- yamlvalidator
- Python 3.7+
- Run
pip install -r requirements.txt
to install the requirements (pyyaml
andrdflib
)
- Begin by forking the repository.
- Activate the Actions feature for the repository under the 'Action' tab
- Locally clone the project.
- Place the files that need conversion or validation into their respective directories, such as
json2yaml_data/input
to convert json to yaml,jsonld2turtle_data/input
to convert jsonld to turtle, and so on. - Commit and push the changes to directory
thamer-experiments
for examplegit add thamer-experiments/
. (Please note that the defined GitHub actions will only be triggered if you push to this directory or any of its sub-directories.) - The transformed file content or the validation output will be accessible in the action's log, for example:
Run jsonld2turtle to convert all files in 'jsonld2turtle_data/input'
Run python3 json2yaml.py
The input file: json2yaml_data/input/test1.jsonld converted to:
'@context':
'@vocab': http://schema.org/
countries: http://publication.europa.eu/resource/authority/country/
'@graph':
- '@id': countries:ITA
- '@id': http://people.example/Homer
country:
'@id': countries:ITA
full_name: Homer Simpson
- '@id': http://people.example/Lisa
country:
'@id': countries:ITA
full_name: Lisa Simpson