Closed vvh-empora closed 8 years ago
Assuming that $jsonLD
in your snippet is the string that you posted above and not a URL, it works as expected. The processor has no base URL, so how could it possibly infer the protocol? You can set the base by passing it as an option
$expanded = JsonLD::expand($jsonLD, array('base' => 'http://www.mytheresa.com/'));
P.S.: It generally helps if you format code and reduce the example as much as possible.
I'm closing this issue now. Feel free to reopen if you think this doesn't work as expected (as described in my previous comment).
hmmm... but by default set an json snippet fragment as "base" ? -> '[{"@context":' thats not what i expect...
Input Data:
running code:
inside the first product object, i get this as image URL:
[{"@context"://img.mytheresa.com/544/544/90/jpeg/catalog/product/5b/P00179370.jpg
the coresponding JSON is this:
"image":"\/\/img.mytheresa.com\/544\/544\/90\/jpeg\/catalog\/product\/5b\/P00179370.jpg"
so relativ URLs to schema are broken?