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.
반응 (1)
비슷한 프로덕트
설명이 비슷한 순
Wrote a JSON parser from scratch in go
github.comFirst time ever working on something like this, check it out
JSON-qs
github.comJSON in query strings, human-readable, compact
Searchable compression for JSON
github.com~99% page skip and sub-ms lookups
Duper
duper.dev.brThe Format That's Super
Jsonic
medium.comPython JSON serialization that works