java - IP address in JSON -


i have json string in below format -

[{"name":"samuel", "department":"finance", "range1":["12.26.83.0/21"], "range2":["12.26.85.0/22"], "range3":["63.88.24.16/18","63.88.26.16/28"] }, //has upto 400 objects in same notation above ] 

this equivalent java notation

    public class test { private string name; private string department; @serializedname("range1") private list<string> ipaddressone; @serializedname("range2") private list<string> ipaddresstwo; @serializedname("range3") private list<string> ipaddressthree; //getters setters //tostring } 

as can seen here, ip address here in cidr notation. question - should represent arraylist of string in java class or plain string? understand gson requires consider within [ ] array. however, when above, , object, range1 has ip addresses of range1's employees, range2 has ip addresses of range2's employees etc. confused, please suggest.


Comments

Popular posts from this blog

android - Inheriting from Theme.AppCompat* -

broadcastreceiver - android BOOT_COMPLETED not received if not activity intent-filter -

basic authentication with http post params android -