Comments (3)
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.
from jsonld.
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).
from jsonld.
hmmm... but by default set an json snippet fragment as "base" ? -> '[{"@context":' thats not what i expect...
from jsonld.
Related Issues (20)
- No expansion of JSON field with name "0" HOT 1
- Process very slow
- Processing fails if @protected or @version are used HOT 1
- How json minify? HOT 3
- Fatal Error - Lists are not supported by getDocument() yet HOT 1
- Failing to parse content with special chars HOT 1
- JSON-LD always framing single object as array HOT 1
- Problem parsing relative @id HOT 1
- Double-quotes need to be escaped in NQuads serialization
- User-Agent required in some Web APIs
- Schema with duplicate value causes infinite loop HOT 1
- Build failure with latest PHP HOT 3
- How to apply all known prefixes to a result set
- Compact properties, but not URIs
- Always return arrays with frame
- Support for JSON-LD 1.1 HOT 2
- Only first JSON+LD block is parsed HOT 1
- Parsing for some sites is broken, maybe a schema.org change: Loading http://schema.org failed HOT 16
- Hydra Support HOT 1
- schema.org no longer returning application/ld+json HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsonld.