ardoq / ardoq-java-client

Java Wrapper for the Ardoq Rest-API
Eclipse Public License 1.0
2 stars 4 forks source link

Implement ExclusionStrategy for Gson serializer that excludes reserved fields from being included when serializeNulls=true #15

Closed ebaxt closed 7 years ago

ebaxt commented 7 years ago

Creating i.e. a Reference when serializeNulls=true causes a 400 exception on the API because reserved fields are set to null. A potential fix is to implement an ExclusionStrategy that prevents reserved fields from being sent as null: https://sites.google.com/site/gson/gson-user-guide#TOC-Excluding-Fields-From-Serialization-and-Deserialization

ebaxt commented 7 years ago

WIP here: https://github.com/ardoq/ardoq-java-client/tree/15_serialize_nulls_issue