Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not omit empty fields from JSON #67

Closed
brightbyte opened this issue Jun 18, 2014 · 1 comment · Fixed by #70
Closed

Do not omit empty fields from JSON #67

brightbyte opened this issue Jun 18, 2014 · 1 comment · Fixed by #70

Comments

@brightbyte
Copy link
Contributor

The new serialization code, Serializers\EntitySerializer, omits empty fields from the data structure. E.g. if there are no descriptions set, addDescriptionsToSerialization() will do nothing instead of adding $serialization['descriptions'] = array();

This is a breaking change versus the old serialization code, compare getSerialized() in Wikibase\Lib\Serializers\EntitySerializer.

This leads to some parts of the JSON representation being optional, which forces consumers to always check for preses. This is likely to break existing consumers (bots, gadgets, etc).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant