Skip to content

nlowe/autojson

Repository files navigation

autojson

Build Status Coverage Status Go Report Card Documentation

autojson makes it easier to return JSON responses and errors for APIs.

Usage

To add autojson to your project, simply go get it:

go get -u github.com/nlowe/autojson

autojson accepts a wide variety of handler functions. See the godoc for details. In general, your handlers now return concrete types and an optional HTTP Status Code and/or error, autojson takes care of the serialization. See the example for more details.

Building

This project makes use of Go Modules. You need Go 1.12+ to fully utilize it.

License

autojson is licensed under the MIT License. It is inspired by the AWS Lambda Go SDK, which is licensed under the Apache 2 License and can be found at https://github.com/aws/aws-lambda-go.

About

http.HandlerFunc wrapper for json-based API's

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages