{"action":"created","issue":{"url":"https://api.github.com/repos/xyncro/chiron/issues/62","repository_url":"https://api.github.com/repos/xyncro/chiron","labels_url":"https://api.github.com/repos/xyncro/chiron/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/xyncro/chiron/issues/62/comments","events_url":"https://api.github.com/repos/xyncro/chiron/issues/62/events","html_url":"https://github.com/xyncro/chiron/issues/62","id":142128503,"number":62,"title":"Flattening nested types","user":{"login":"jackmott","id":4701158,"avatar_url":"https://avatars.githubusercontent.com/u/4701158?v=3","gravatar_id":"","url":"https://api.github.com/users/jackmott","html_url":"https://github.com/jackmott","followers_url":"https://api.github.com/users/jackmott/followers","following_url":"https://api.github.com/users/jackmott/following{/other_user}","gists_url":"https://api.github.com/users/jackmott/gists{/gist_id}","starred_url":"https://api.github.com/users/jackmott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackmott/subscriptions","organizations_url":"https://api.github.com/users/jackmott/orgs","repos_url":"https://api.github.com/users/jackmott/repos","events_url":"https://api.github.com/users/jackmott/events{/privacy}","received_events_url":"https://api.github.com/users/jackmott/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-03-20T04:44:45Z","updated_at":"2016-03-20T14:56:04Z","closed_at":"2016-03-20T12:48:03Z","body":"I would like to 'flatten' the json output of a nested type when serializing  to json. To illustrate what I mean, below is the the logic I would like to express:\r\n\r\n```f#\r\n\r\ntype EffortData = \r\n    {\r\n        lap          : int       \r\n        distance : distance \r\n        splits       : SplitTracker []\r\n    }\r\n    static member ToJson (x:EffortData) =\r\n        Json.write \"lap\" x.lap\r\n     *> Json.write \"distance\" (x.distance.ToString())\r\n     for i in 0 .. x.splits.Length do\r\n           *> Json.write x.splits.[i].name x.splits.[i].duration\r\n\r\n```\r\n\r\nHow can I accomplish this?"},"comment":{"url":"https://api.github.com/repos/xyncro/chiron/issues/comments/198946524","html_url":"https://github.com/xyncro/chiron/issues/62#issuecomment-198946524","issue_url":"https://api.github.com/repos/xyncro/chiron/issues/62","id":198946524,"user":{"login":"kolektiv","id":1546,"avatar_url":"https://avatars.githubusercontent.com/u/1546?v=3","gravatar_id":"","url":"https://api.github.com/users/kolektiv","html_url":"https://github.com/kolektiv","followers_url":"https://api.github.com/users/kolektiv/followers","following_url":"https://api.github.com/users/kolektiv/following{/other_user}","gists_url":"https://api.github.com/users/kolektiv/gists{/gist_id}","starred_url":"https://api.github.com/users/kolektiv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kolektiv/subscriptions","organizations_url":"https://api.github.com/users/kolektiv/orgs","repos_url":"https://api.github.com/users/kolektiv/repos","events_url":"https://api.github.com/users/kolektiv/events{/privacy}","received_events_url":"https://api.github.com/users/kolektiv/received_events","type":"User","site_admin":false},"created_at":"2016-03-20T14:56:04Z","updated_at":"2016-03-20T14:56:04Z","body":"Oh, hmmm. Seemed to work for me with a faked test, is it not working for you? If you want to paste some code in somewhere (maybe a gist) I can take a look."}}