wmde / WikibaseDataModelSerialization

Serializers and deserializers for the Wikibase DataModel
http://wikiba.se/
Other
9 stars 9 forks source link

Implement AliasGroup serializer #153

Closed addshore closed 9 years ago

addshore commented 9 years ago

This will be needed by the ResultBuilder class in Wikibase for API XML output.

addshore commented 9 years ago

@Benestar turns out we do needs this....

Benestar commented 9 years ago

How should the serialization look like then? Should it contain the language code as an array key or should it only add the language code to all aliases individually? Also do we need an AliasGroupDeserializer as well? Otherwise this should be relatively easy.

addshore commented 9 years ago

I only need the Serializer, although a Deserializer would likely be useful for clients. I reckon only add the language code to the aliases individually. This would probably mean the Deserializer should make sure all of the aliases have the same language

JeroenDeDauw commented 9 years ago

Keep in mind that there could be multiple serilaizers for any given object. So there is no need to make one that makes most sense for all possible use cases.