Closed mkllnk closed 9 months ago
The API of the serializer advertised this option already but ignored it later on. Now we use it instead of repeating the context URL. This allows software to call the serialiser with their own context:
tomato = DataFoodConsortium::Connector::SuppliedProduct.new("https://myplatform.com/tomato") inputContext = DataFoodConsortium::Connector::Context.inputContext outputContext = "https://www.datafoodconsortium.org/wp-content/plugins/wordpress-context-jsonld/context.jsonld" exporter = DataFoodConsortium::Connector::JsonLdSerializer.new(outputContext, inputContext) exporter.process(tomato)
I also simplified some Ruby code along the way.
The API of the serializer advertised this option already but ignored it later on. Now we use it instead of repeating the context URL. This allows software to call the serialiser with their own context:
I also simplified some Ruby code along the way.