How to Implement Logansquare TypeConverter in Inner json object class

284 Views Asked by At

My Question is How to Implement Logansquare Custom TypeConverter class in the Inner Json object class.

This is my model class :

class CommunicationParser{

    @JsonField
    public String MSG;
    @JsonField
    public int DATA_ID;
    @JsonField
    public ArrayList<Records> RECORDS;

    @JsonObject
    public static class Records {
        @JsonField
        public String REC1;
        @JsonField
        public String REC2;
        @JsonField
        public int REC_VALUE;

      @JsonField   // Error occur when apply annotation
        public communication COMMUNICATIONACTION;  //MAKE ERROR IN THIS LINE

    }

    @JsonObject
    public static class communication {
        @JsonField
        public PrimaryAction PRIMARYACTION;
        @JsonField
        public ArrayList<SecondaryAction> SECONDARYACTION;
    }

    @JsonObject
    public static class PrimaryAction {
        @JsonField
        public int ID;
        @JsonField
        public String TITLE;
    }

    @JsonObject
    public static class SecondaryAction {
        @JsonField
        public int ID;
        @JsonField
        public String TITLE;
    }
}

How to Implement Logansquare Custom TypeConverter class in the Inner Json object class? kindly give me a solution..

Thanks in Advance

0

There are 0 best solutions below