go-jsonerror alternatives and similar packages
Based on the "JSON" category.
Alternatively, view go-jsonerror alternatives based on common mentions on social networks and blogs.
-
jsonparser
One of the fastest alternative JSON parser for Go that does not require schema -
fastjson
Fast JSON parser and validator for Go. No custom structs, no code generation, no reflection -
marshmallow
Marshmallow provides a flexible and performant JSON unmarshalling in Go. It specializes in dealing with unstructured struct - when some fields are known and some aren't, with zero performance overhead nor extra coding needed. -
jsondiff
Compute the diff between two JSON documents as a series of RFC6902 (JSON Patch) operations -
JSON-to-Proto
convert JSON to Protocol Buffers online in your browser instantly -
ujson
µjson - A fast and minimal JSON parser and transformer that works on unstructured JSON -
mapslice-json
Go MapSlice for ordered marshal/ unmarshal of maps in JSON -
ask
A Go package that provides a simple way of accessing nested properties in maps and slices. -
Better Parsing of Unstructured JSON in Go
An error propagating JSON parsing library for Go -
epoch
Contains primitives for marshaling/unmarshaling Unix timestamp/epoch to/from built-in time.Time type in JSON -
omg.jsonparser
The simple JSON parser with validation by condition -
go-parameters
:blue_book: Easily parse incoming parameters and values from an HTTP request -
jsonToStruct
Golang code generator for creating struct from json. -
JSONcJSON
JSONC (json with comments) to JSON translator for Golang. -
jsonhandlers
JSON library to expose simple handlers that lets you easily read and write json from various sources.
Learn any GitHub repo in 59 seconds
Do you think we are missing an alternative of go-jsonerror or a related project?
Popular Comparisons
README
Go-JsonError
Go-JsonError is meant to allow us to easily create json response errors that follow the JsonApi spec.
Usuage
In order to use jsonError you will need to initliaze the ErrorJson struct. Then when you would like to add an error you must pass in a ErrorComp struct to the AddError().
This follows the jsonapi spec where the error response must return an array.
Here is a basic example
var err ErrorJSON
errorComposition := ErrorComp{
Detail: "this is a error message",
Code: "This is the code",
Source: Source{
Pointer: "/unit/tests",
},
Title: "Title Test",
Status: 200,
}
err.AddError(errorComposition)
err.Error()
err.ErrorByte()
Running the tests
This package is just using the standard test packge included with go. You can run the test cases with
go test ./...
Contributing
Please feel free to submit any pull requests.
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
Authors
- David Dymko
License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
*Note that all licence references and agreements mentioned in the go-jsonerror README section above
are relevant to that project's source code only.