I am fetching 300k+ records in a object from database. I am trying to serialize the heavy object below:
List<user> allUsersList = businessProvider.GetAllUsers();
string json = JsonConvert.SerializeObject(allUsersList);
I am getting following exception while serializing the list - allUsersList.
Out of memory exception
i am using newtonsoft.json assembly to deserialize it.