Page MenuHomePhabricator

DataModelSerialization: Serializers to be used with the MediaWiki API need to inject meta-info like _indexTagNames, to allow XML output from API modules.
Closed, ResolvedPublic

Description

There are several way to inject these meta-markers:

  1. hard-code knowedge about the respective markers into the serializers
  2. make the serializers depend on MediaWiki API code
  3. inject a callback for post-processing substructures, which could be used to inject the meta-markers.
  4. use a decorator to post-processing substructures, to inject the meta-markers.
  5. post-process the complete data structure representing an entity, injecting the markers in the appropriate places

See also: https://github.com/wmde/WikibaseDataModelSerialization/issues/53

Event Timeline

Lucie raised the priority of this task from to Needs Triage.
Lucie updated the task description. (Show Details)
Lucie changed Security from none to None.
Lucie subscribed.
daniel renamed this task from OPT_INDEX_TAGS to Serializers to be used with the MediaWiki API need to inject meta-info like _indexTagNames, to allow XML output from API modules..May 12 2015, 1:11 PM
daniel updated the task description. (Show Details)

we have to update the existing serialization code for the recent api changes (to no longer use deprecated stuff). it's probably not very difficult but touches a bit of the code. I am not sure we can avoid this.

and that would then better inform how we might go about implementing handling of this in the new serialization code.

daniel renamed this task from Serializers to be used with the MediaWiki API need to inject meta-info like _indexTagNames, to allow XML output from API modules. to DataModelSerialization: Serializers to be used with the MediaWiki API need to inject meta-info like _indexTagNames, to allow XML output from API modules..May 12 2015, 4:16 PM
daniel moved this task from incoming to ready to go on the Wikidata board.

This is currently being worked on by me using callback and the new SerializationModifier class in Wikibase (while trying to get rid of LibSerialization stuff)

This blocks "WikibaseDataModelSerialization with what we do with WikibaseLib" and although we have totally removed the Lib Serialization I would not consider this task complete in regards to WikibaseDataModelSerialization.

Right now we are still shoving all of this meta info into the result after serialization, tbh I don't think this stuff belogs in WikibaseDataModelSerialization unless we can think of a very clean approach!

This issue should be closed based on what it was originally filed for. If it's now supposed to track something else, then I'm not quite sure what or why.