https://github.com/dnnfable/thoth.json.net.formatter
JsonMediaFormatter based on Thoth.Json.Net
https://github.com/dnnfable/thoth.json.net.formatter
Last synced: 7 months ago
JSON representation
JsonMediaFormatter based on Thoth.Json.Net
- Host: GitHub
- URL: https://github.com/dnnfable/thoth.json.net.formatter
- Owner: DnnFable
- Created: 2019-09-06T09:32:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-20T09:32:02.000Z (about 6 years ago)
- Last Synced: 2025-09-27T20:36:27.534Z (8 months ago)
- Language: F#
- Homepage:
- Size: 68.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Thoth.Json.Net.Formatter
[](https://www.nuget.org/packages/Thoth.Json.Net.Formatter/)
`Thoth.Json.Net.Formatter` is a JsonMediaTypeFormatter which can be used with Asp.Net WebApi to handle requests from `Thoth.Fetch` and uses `Thoth.Json.Net` for encoding and decoding.
## Example for using the formatter within your service
```fsharp
type FableFormatterAttribute() =
inherit System.Attribute()
interface IControllerConfiguration with
member __.Initialize((controllerSettings : HttpControllerSettings), _) =
controllerSettings.Formatters.Clear()
controllerSettings.Formatters.Add <| Thoth.Json.Net.Formatter()
[]
type MyServiceController () =
inherit ApiController ()
```