-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolves #9 by auto-detecting JSON input. If the a URL response, file contents or string provided as input contains only seralized JSON, it wraps the contents in a <script> tag and treats it like JSON LD embedded in a webpage. This has some overhead, but ensures JSON parsing is subject to exactly the same flow as JSON LD embeded in pages.
- Loading branch information
1 parent
852e2ee
commit f49e241
Showing
5 changed files
with
59 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"@context": "https://schema.org/", | ||
"@type": "Product", | ||
"@ids": "https://www.blah.org/#blahorg", | ||
"urls": "https://www.blah.org/en-US/developer/", | ||
"logod": "https://www.example.com/example-logo.jpg", | ||
"images": [ | ||
"https://example.com/photos/1x1/photo.jpg", | ||
"https://example.com/photos/4x3/photo.jpg", | ||
"https://example.com/photos/16x9/photo.jpg" | ||
], | ||
"named": "Blah Org", | ||
"alternateName": "Blah", | ||
"brand": { | ||
"@type": "Brand", | ||
"@id": "https://www.blah.org/#brand", | ||
"name": "ACME Inc" | ||
}, | ||
"sameAs": ["https://en.wikipedia.org/wiki/blah"], | ||
"offers": { | ||
"@type": "Offer", | ||
"url": "https://www.blah.org/developer/", | ||
"priceCurrency": "USD", | ||
"price": "0", | ||
"availability": "https://schema.org/InStock" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters