-
Notifications
You must be signed in to change notification settings - Fork 4
JSON LD Data Format
DFC protoype is based on Web Semantic principle and follows an ontology in order to define and structure its Data Model. You can find more details about it here, https://github.com/datafoodconsortium/ontology. The data format has to follow the JSON-LD standard (https://json-ld.org/). We provide you data frame for the different APIs we are supporting.
You can also find examples of data format on your gitbook, https://datafoodconsortium.gitbook.io/dfc-standard-documentation/appendixes/practical-examples.
You need to provide an endpoint that will display the different elements of your Catalog in the JSON-LD standard.
The endpoint format has to follow REST format basically.
The data structure can be found inside the ontology, but let's show you an example for better oversight:
{
"@context":{
"DFC":"http://datafoodconsortium.org/ontologies/DFC_FullModel.owl#",
"@base":"https://my-app.com/api/dfc/v1/"
},
"@id":"/entreprise/13616/catalog",
"DFC:supplies":[
{
"DFC:description":"DFC-Oeufs 12 pièces",
"DFC:quantity":12,
"@id":"/suppliedProduct/item21345",
"DFC:hasUnit":{"@id":"/unit/Piece"}
},
{
"DFC:description":"DFC-Oeufs 6 pièces",
"DFC:quantity":6,
"@id":"/suppliedProduct/item21344",
"DFC:hasUnit":{"@id":"/unit/Piece"}
},
{
"DFC:description":"DFC-Paniers de légumes 12 Kg.",
"DFC:quantity":12,
"@id":"/suppliedProduct/item21347",
"DFC:hasUnit":{"@id":"/unit/Kilogram"}
},
{
"DFC:description":"DFC-Paniers de légumes 5 Kg.",
"DFC:quantity":5,
"@id":"/suppliedProduct/item21346",
"DFC:hasUnit":{"@id":"/unit/Kilogram"}
}
],
"@type":"DFC:Entreprise"
}
Work in progress...
Work in progress...
Work in progress...