0

While seeing examples of JSON-LD Documents, I see some keys that start with @. Is there any rule that dicatates which of the keys should start with @ ? In this example, why might one choose to use @value instead of value?

"credentialSubject": {
    "id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
    "animalType": [
      {
        "@value": "Dog",
        "@language": "en"
      },
      {
        "@value": "Chien",
        "@language": "fr"
      }
    ]

1 Answer 1

2

These keys starting with @ are JSON-LD keywords. They are part of, and defined by, JSON-LD.

In this example, why might one choose to use @value instead of value?

When using value instead of @value (without defining value to be an alias for @value in your context),

  • the object would no longer be a valid Value Object (i.e., the @language would no longer be associated with the value), and
  • value would be interpreted according to your context (e.g., if you were using Schema.org, it would result in the property http://schema.org/value).
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.