F# DataContractJsonSerializer StackOverflowException
Posted
by akaphenom
on Stack Overflow
See other posts from Stack Overflow
or by akaphenom
Published on 2010-04-28T17:33:57Z
Indexed on
2010/04/28
17:57 UTC
Read the original article
Hit count: 646
dataElementsList : TypesAndData.DataElement list
is a list of 50,000 records (actually many more but lest start small). I am trying to serialize to JSON file:
let ser = Json.DataContractJsonSerializer(typeof<TypesAndData.DataElement list>)
use ofs = File.OpenWrite(fileName)
let result = ser.WriteObject(ofs, dataElementsList)
and am getting the infamous StackOverflowException. to be precise:
An unhandled exception of type 'System.StackOverflowException' occurred in FSharp.Core.dll
any advice?
© Stack Overflow or respective owner