thoth-org / Thoth.Json

Library for working with JSON in a type safe manner, this libs is targeting Fable

Home Page:https://thoth-org.github.io/Thoth.Json/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Encode.Auto.toString which doesn't take the spaces as parameters

MangelMaxime opened this issue · comments

Having a version which doesn't take the space as parameters allows to write code like that out of the box:

        let body =
            (
                {
                    DomainId = domainId
                } : Request.GetMachinesListByDomain
            )
            |> Encode.Auto.toString

If the default, are not good for the user, he can still use it's own helpers as before.

type Encode.Auto with

    static member inline toString(value : 'T, ?caseStrategy : CaseStrategy, ?extra: ExtraCoders, ?skipNullField: bool) : string =
        Encode.Auto.toString(0, value, ?caseStrategy = caseStrategy, ?extra = extra, ?skipNullField = skipNullField)