I want to map my firebase data object to my pojo. However, my firebase object property name is snake case, such as; "user_name". I want to use camelCase on my pojo, such as; "userName"
I found beautiful answers like this one, however, I couldn't find any sample about snake_case to camelCase mapping.
My pojo;
@SerializedName("content")
private String content;
@SerializedName("user_name")
private String userName;
I'm using the following line of code for mapping. 'content' matches with no problem(with or without @SerializedName annotation) but userName stays as null.
Story story = storySnapshot.getValue(Story.class);
That is also an issue for obfuscation. Is there an elegant way to match the data to pojo?