More details to be added, likely still using form elements but then using .serialise() jquery functions to convert it to postable JSON
This means we don't need to reload the page, which is better for UX and allows us to keep the current client side image loaded without fancy extra code to redirect back to the last image they worked on.
**Data to send:**post as JSON string:**
e.g. When Nigeria has been selected as Wiki Loves country on "Person playing chess" image:
[
{"image", "Person playing chess", "edit_type": "depicts", "edit_action": "add", "edit_content": "Q5", "country": "Nigeria"},
{"image", "Person playing chess", "edit_type": "depicts", "edit_action": "remove", "edit_content": "Q27", "country": "Nigeria"},
]
Or, no Wiki Loves country selected:
'country' - from country subcategory in url parameter (if present)[
'{"image-name' - use getImageFilename() toe", "Person playing chess", "edit_type": "depicts", "edit_action": "add", "edit_content": "Q5"},
'contributions' - populate us{"image", "Person playing generateContributionData() into relevant hidden form field (from {T224479})chess", "edit_type": "depicts", "edit_action": "remove", "edit_content": "Q27"},
e.g. [{type: "depicts", action: "add", content: "Q123"}, {type: "depicts", action: "remove", content: "Q349"}]
IdeallyA caption example:
[
{"image", "Person playing chess", "edit_type": "caption", "edit_action": "add", "edit_content": "{language: "en", actual submission should only happen after edit has been confirmed by response from Wikimedia API"A person playing a game of chess}"},
]