Thoth.Json icon indicating copy to clipboard operation
Thoth.Json copied to clipboard

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

Open MangelMaxime opened this issue 3 years ago • 0 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)

MangelMaxime avatar Jun 13 '22 08:06 MangelMaxime