Store Data as JSON
Date: March 2023
Status: Accepted
Context
We need to store structured data that can be viewed and edited in wiki pages.
Semantic MediaWiki stores the data in wikitext and Wikibase stores the data in JSON.
Decision
Store the data in JSON.
Consequences
Pros:
- All values can be edited, since they cannot be generated by wikitext. We can thus allow editing of query results.
- JSON is easier to parse and generate than wikitext.
- We can accurately see historical values in the revision history.
Cons:
- No out-of-the-box user scripting. Users cannot use wikitext templates, functions, etc. to generate values.