Page MenuHomePhabricator

Check usages/ purpose of GenericServices::getCompactBaseDataModelSerializerFactory
Open, Needs TriagePublic0 Estimated Story Points

Description

In T227207: Wikibase JSON output (dumps, Special:EntityData) lacks qualifier hashes we discovered that GenericServices::getCompactBaseDataModelSerializerFactory is used to create entity JSON output for the dumps and Special:EntityData. The function is documented as Factory creating serializers that generate the most compact serialization., but that doesn't seem to be the way it is used currently (we expect hashes in the output for example).

  • We should look how/ where this function is used and whether it is appropriate.
  • Fix all usages
  • The function should be changed to using SerializerFactory::OPTION_SERIALIZE_SNAKS_WITHOUT_HASH again (essentially revert 881780ae6b1f5cacb224efa9fa065599e51bb028)

Event Timeline

hoo created this task.Jul 4 2019, 12:55 PM
Restricted Application added a project: Wikidata. · View Herald TranscriptJul 4 2019, 12:55 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
hoo added a comment.Jul 4 2019, 1:27 PM

GenericServices::getCompactBaseDataModelSerializerFactory, which is set to omit hashes for references and mainsnaks, is used for everything, but references are correctly included. So either they're injected later on (but I don't see that happening) or the requested omission is not working correctly, it seems.