How do I go about defining a record that would be serialized to a JSON object… I’ve been trying to build the oConfig parameter for YUI2 constructor, something like:
type TreeParameter =
{
Type : string
Label : string
Expanded : bool
Children : TreeParameter array
}
Thanks!
David
I guess we could implement this but it has not yet made it into the interface generator. For now you can do:
From F# point of view the generated type will look like this:
From JavaScript perspective, the values would look like this:
In essence it is like a record without the benefit of record syntax and functional extension.