Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid json #6925

Closed
fuddl opened this issue Jun 19, 2022 · 3 comments
Closed

invalid json #6925

fuddl opened this issue Jun 19, 2022 · 3 comments

Comments

@fuddl
Copy link
Contributor

fuddl commented Jun 19, 2022

Looking at the source code of
https://world.openfoodfacts.org/category/beverages

<script type="application/ld+json">
{
	"@context" : "https://schema.org",
	"@type" : "WebSite",
	"name" : "Open Food Facts",
	"url" : "https://world.openfoodfacts.org",
	"potentialAction": {
		"@type": "SearchAction",
		"target": "https://world.openfoodfacts.org/cgi/search.pl?search_terms=?{search_term_string}",
		"query-input": "required name=search_term_string"
	}
}
{
	"@context": "https://schema.org/",
	"@type": "Organization",
	"url": "https://world.openfoodfacts.org",
	"logo": "https://static.openfoodfacts.org/images/logos/off-logo-vertical-light.svg",
	"name": "Open Food Facts",
	"sameAs" : [ "https://www.facebook.com/OpenFoodFacts", "https://twitter.com/OpenFoodFacts"]
}
</script>

should be split into two blocks

<script type="application/ld+json">
{
	"@context" : "https://schema.org",
	"@type" : "WebSite",
	"name" : "Open Food Facts",
	"url" : "https://world.openfoodfacts.org",
	"potentialAction": {
		"@type": "SearchAction",
		"target": "https://world.openfoodfacts.org/cgi/search.pl?search_terms=?{search_term_string}",
		"query-input": "required name=search_term_string"
	}
}
</script>
<script type="application/ld+json">
{
	"@context": "https://schema.org/",
	"@type": "Organization",
	"url": "https://world.openfoodfacts.org",
	"logo": "https://static.openfoodfacts.org/images/logos/off-logo-vertical-light.svg",
	"name": "Open Food Facts",
	"sameAs" : [ "https://www.facebook.com/OpenFoodFacts", "https://twitter.com/OpenFoodFacts"]
}
</script>
@fuddl fuddl changed the title invalid joson invalid json Jun 19, 2022
@teolemon
Copy link
Member

ah :-)
tit for tat, I'm moving it to the server repository :-)

@teolemon teolemon transferred this issue from openfoodfacts/openfoodfacts-web Jun 19, 2022
@teolemon
Copy link
Member

thanks @fuddl for reporting
Wikidata is how I spend time away from open data 🤪

@dipietroR
Copy link
Contributor

#6934 fixes this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants