Currently, the API specification says...
For each item in language value:
....
item must be a string, otherwise an invalid language map value error has been detected and processing is aborted.
Consequently, that means the following JSON-LD (that both I and AI thought was possible...) actually fails (generated by Google's current "AI Mode"):
{
"@context": {
"schema": "https://schema.org",
"name": {
"@id": "schema:name",
"@container": "@language"
}
},
"@id": "https://example.com",
"@type": "schema:Product",
"name": {
"en": "W3C Headphones!",
"ar": {
"@value": "!W3C سماعات",
"@direction": "rtl"
}
}
}
The above code in the JSON-LD Playground it fails with...
Invalid JSON-LD syntax; language map values must be strings.
...as it should, per the current spec.
I'd like to explore changing that text such that Language Maps can support the provision of @direction inline.
Currently, the API specification says...
Consequently, that means the following JSON-LD (that both I and AI thought was possible...) actually fails (generated by Google's current "AI Mode"):
{ "@context": { "schema": "https://schema.org", "name": { "@id": "schema:name", "@container": "@language" } }, "@id": "https://example.com", "@type": "schema:Product", "name": { "en": "W3C Headphones!", "ar": { "@value": "!W3C سماعات", "@direction": "rtl" } } }The above code in the JSON-LD Playground it fails with...
I'd like to explore changing that text such that Language Maps can support the provision of
@directioninline.