Serialization of the class Comment not well defined #8

Closed
opened 2019-11-12 20:47:17 +00:00 by norangebit · 1 comment
Owner

The get_all_comments method returns fileds authorId and comment, while the get_board_card_comment method returns userID and text.

I don't think duplicating fields is the best thing to do.
It is necessary to see if it is possible to set Gson so that he recognizes the two competing fields as the only one.

The [`get_all_comments`](https://wekan.github.io/api/v3.50/#get_all_comments) method returns fileds `authorId` and `comment`, while the [`get_board_card_comment`](https://wekan.github.io/api/v3.50/#get_board_card_comment) method returns `userID` and `text`. I don't think duplicating fields is the best thing to do. It is necessary to see if it is possible to set Gson so that he recognizes the two competing fields as the only one.
Owner

Try this: @SerializedName(value = "authorId", alternate = {"userId"})

Try this: @SerializedName(value = "authorId", alternate = {"userId"})
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: kanban/wedroid#8
No description provided.