Skip to content

DnnFable/Thoth.Json.Net.Formatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thoth.Json.Net.Formatter

Nuget

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

type FableFormatterAttribute() =
    inherit System.Attribute()
    interface IControllerConfiguration with
        member __.Initialize((controllerSettings : HttpControllerSettings), _) =
            controllerSettings.Formatters.Clear()
            controllerSettings.Formatters.Add <| Thoth.Json.Net.Formatter()

[<FableFormatter>]
type MyServiceController () =
    inherit ApiController ()

About

JsonMediaFormatter based on Thoth.Json.Net

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages