java - How to choose class-coding way when using GSON -


there 2 class-coding way use gson,the 1 is

class {     b b;     c c;     public static class b {         c c;         public static class c {             //the same a.c         }     }     public static class c {     } } 

the other is

class {     b b;     c c;     public class b{         c c;     }     public class c {     } } 

all of 2 way can work. can see ,the first way can provide re-code , easy code,but target json become more , more complex, become hard use static class in class a, second way can more easy use in case, second way use repeated class, , whether same static class in different class occupy more resource.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -