Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Problem validating JSON-LD @ nodes like @id #691

Answered by mpvl
fils asked this question in Q&A
Discussion options

You must be logged in to vote

You did the right thing. The error that you are getting means that there was no concrete value and thus a required field is missing, thereby implying a required field is missing.

We are seriously contemplating adding a ! marker for fields so you could write:

"@id"!: string   // must have an @id value node (PROPOSAL)

making it explicit that a field is required. This should make the corresponding error message also clearer. One benefit is that required fields are typically rarer in API, so ! should not have to be used too much. In addition, it results in a somewhat better model that was we currently have with ?. For one, we would have better error messages. :)

The transition would be fairl…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@mpvl
Comment options

@fils
Comment options

Answer selected by fils
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants