I need to convert a JSON string which contains more than 1 lakh elements to json object. When i use eval in IE it throws out of memory error..
any other approach for this?
there is no importance for the country in creating json structure. var myJson = '{ "x": "Hello, World!", "y1": [1, 2, 3] },"y2": [1, 2, 3] },"y3": [1, 2, 3] },"y4": [1, 2, 3] }';
eval throws out of memory error(in IE)if this exceeds 70k
i would suggest that too - 70k is a lot of data and in case those records are for a grid/table or similar it is better to use a kind of paging mechanism then. from experience it is rather useless to present a user more then 100-150 lines in a table - since a) he/she cannot overview it and even has to scroll a lot and b) performance is bad, since it often implies lots of created DOM-nodes then.
if its not for a table but for a complex object - implement a 'lazy loading' mechanism (kind of 'paged object' where the pages are semanticaly structured properties) - and load data when they are needed.
Comment