w3c / w3c/string-meta

Exemple 4 is incompatible with JSON-LD language maps

Open
#13 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
16
Forks
10
PR merge metrics
No merged PRs in 30d

Description

The current example 4 is not valid JSON-LD if the title is defined in the context as a language map:

"title": {
  "@id": "http://schema.org/name",
  "@container": "@language"
}

This returns the following error in the JSON-LD Playground:

jsonld.SyntaxError: Invalid JSON-LD syntax; language map values must be strings.

Duplicating the language (map + language) also feels less than ideal in these examples.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review Example 4 and its context definition, then reproduce the error in the JSON-LD Playground. Determine how the language-map example should represent the title without duplicating language information, and confirm that the revised example is valid JSON-LD and no longer produces the reported syntax error.

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.