← 최신 프로덕트

Go-testdeep

testing JSON content in Golang. func JSON(expectedJSON any, params ...any) TestDeep JSON operator allows to compare the JSON representation of data against expectedJSON. expectedJSON can be a: string containing JSON data like {"fullname":"Bob","age":42} string containing a JSON filename, ending with “.json” (its content is os.ReadFile before unmarshaling) []byte containing JSON data encoding/json.RawMessage containing JSON data io.Reader stream containing JSON data (is io.ReadAll before unmarshaling) expectedJSON JSON value can contain placeholders. The params are for any placeholder parameters in expectedJSON. params can contain TestDeep operators as well as raw values. A placeholder can be numeric like $2 or named like $name and always references an item in params. params can also contains [encoding/json/v2.Options] when [encoding/json/v2] must be used, see jsonv2 example. The last release of go-testdeep brings a lot of new features, including some JSON enhancements making it probably one of the best solutions to do JSON comparisons in golang world.

go-testdeep.zetta.rocks 방문외부 사이트

반응 (1)

비슷한 프로덕트

설명이 비슷한 순

  1. First time ever working on something like this, check it out

    Hacker News22점

  2. JSON-qs

    github.com

    JSON in query strings, human-readable, compact

    Hacker News13점

  3. ~99% page skip and sub-ms lookups

    Hacker News15점

  4. Duper

    duper.dev.br

    The Format That's Super

    Hacker News31점

  5. Jsonic

    medium.com

    Python JSON serialization that works

    Hacker News24점