I was wondering what the easiest way would be to return clean json from the result of a discriminated union in WebApi? This use case is for business logic only and not used for http errors, etc - those get handled in the pipeline and get returned to user as usual (404, 500, etc) 

For example:

```
type ServiceResult<'a> = { Message:string; Payload:'a }

type ServiceResponse<'a> =
    | Success of ServiceResult<'a>
    | Fail of ServiceResult<string>

```

Returns Either:

```
{
  "Case": "Fail",
  "Fields": [
    {
      "Message": "Error performing business logic, your x is not in the y.",
      "Payload": "I just couldnt do it"
    }
  ]
}

```

...or...

```
{
  "Case": "Success",
  "Fields": [
    {
      "Message": "",
      "Payload": { "FirstName": "Johnny", "LastName":"Smith" }
    }
  ]
}

```

Where I would like to have only the service result returned like:

```
{
  "Message": "",
  "Payload": { "FirstName": "Johnny", "LastName":"Smith" }
}

```

... or ... 

```
{
  "Message": "Error during operation due to spite.",
  "Payload": "I just couldnt do it"
}

```

I have tried IdiomaticDuConverter:
<https://gist.github.com/isaacabraham/ba679f285bfd15d2f53e>

but it didnt work. The closest i have seen is Microsoft.FSharpLu.Json but it doesnt have a MediaTypeFormatter to plug into the pipeline.

I know i can use Lu and create my own MediaTypeFormatter but I feel like there has to be an easier way (like some Json.Net option I am missing).

Can you point me in the right direction?

thanks :-)