I am trying to create a tree (through a discriminated union type) in my F # application to represent my data in a general way. I researched what is available on the Internet and I found things like JavaScriptSerializer and DataContractJsonSerializer . The problem is that I really do not serialize the data to a specific object.
Here is my discriminatory union:
type ParameterTree =
| End
| Node of string * Dictionary<string, Parameter> * ParameterTree
Basically, I want to be able to read from the stream and populate the ParameterTree with the data that I get from the stream (including the appropriate parent / child relationship). I'm stuck on where to start. If someone can point me in the right direction, I would appreciate it.
source
share