0

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

barbsan
  • 3,418
  • 11
  • 21
  • 28
TSM
  • 39
  • 4
  • *Error occur when apply annotation* - what error? Update your question with full error message (as text) – barbsan Mar 22 '19 at 13:13
  • This Error message appear.. "com.bluelinelabs.logansquare.NoSuchTypeConverterException: Class com.recordapp.model.api.entity.CommunicationParser.Records does not having a TypeConverter defined. TypeConverters can be added using LoganSquare.registerTypeConverter()." – TSM Mar 25 '19 at 04:52

0 Answers0