Unusual JSON schemas
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reviewing the XQueue endpoint responses and any existing schema or API documentation. Confirm which entities currently contain JSON-encoded strings, then document or implement the agreed response shape and verify the compatibility impact of replacing those strings with objects.
Written by the indexing model from the issue text.
Description
I wonder if there is any documentation for the JSON entities returned by the XQueue endpoints?
So far the best I can do is reverse engineering. I was surprised to see JSON objects embedded in JSON strings. What is the motivation for doing that? The drawbacks of this solution are that:
- it makes it harder to define a proper JSON schema for these entities (consequently, it makes it impossible to decode these entities with automated solutions based on such schemas),
- entities have to be parsed several times,
- entities take more space because they are escaped several times,
- pretty printing an entity is hopeless.
Why not use plain old JSON objects instead?
To be clearer, I propose that we replace the following schema:
{
"foo": "{ \"bar\": \"baz\" }"
}
With this one:
{
"foo": {
"bar": "baz"
}
}
- Dominant language
- Python
- Stars
- 39
- Forks
- 102
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openedx/xqueue
-
maintenance needs maintainer attention
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100