How to integrate greenDAO with JSON Jackson and ha

2020-07-16 12:41发布

问题:

Is there any best way to integrate JSON Jackson with greenDAO. Also, how to handle many to many relation mapping using greenDAO. I found that, we need to create a connecting table to have many to many mapping. Is there any example having all these features together.

回答1:

You can do it in dao Generator file edit entity.ftl

and add necessary lines to integrate Jackson ie

import com.fasterxml.jackson.annotation.JsonProperty; 

and

@JsonProperty("Tag Name")

Thus you dont have to write any extra code for this.