Closed azdoudYoussef closed 2 years ago
This library is no longer maintained.
The problem you are seeing is because JsonProperty
is a Jackson annotation; this library is Gson based (see e.g. https://github.com/cloudant/java-cloudant/issues/352).
If for whatever reason you want to continue using/forking this now unmaintained library you would need to change your model class to use Gson e.g. by using the equivalent annotation (@SerializedName
), or register a GsonBuilder
with a TypeAdapter
that supports deserialization into your model class.
Alternatively our replacement https://github.com/IBM/cloudant-java-sdk/ has an option to get raw byte streams which you can use to bypass its built-in serializer and pass the bytes to an alternative serializer of your choice (e.g. Jackson).
I have within a database a set of documents in CouchDB where their structure is as follow :
as you can see the properties are not camel-cased, I have tried to make the mapping using JsonProperty,
however, I get null value in all properties except for status property.
I have pushed the code in this repo link
Any help is much appreciated
Regarding the CouchDB, I using a docker container with CouchDB image.
Versions: java : 11 cloudand : 2.19.1 spring boot : 2.6.4