I am trying to get data from db and present that data in json object. to represent the data into json object i'm trying to iterate from resultset object and add result into a list. But is it good to create a class object inside while loop. In my case it is going to create more than 100 objects. I am trying to get data from db and present tha