Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/256dpi/jsonapi
A fundamental and extendable JSON API library for Go.
https://github.com/256dpi/jsonapi
go golang json-api
Last synced: 22 days ago
JSON representation
A fundamental and extendable JSON API library for Go.
- Host: GitHub
- URL: https://github.com/256dpi/jsonapi
- Owner: 256dpi
- License: mit
- Created: 2016-09-01T22:16:28.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-17T19:53:49.000Z (almost 2 years ago)
- Last Synced: 2024-10-04T16:15:24.790Z (about 1 month ago)
- Topics: go, golang, json-api
- Language: Go
- Homepage:
- Size: 225 KB
- Stars: 12
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# jsonapi
[![Test](https://github.com/256dpi/jsonapi/actions/workflows/test.yml/badge.svg)](https://github.com/256dpi/jsonapi/actions/workflows/test.yml)
[![GoDoc](https://godoc.org/github.com/256dpi/jsonapi?status.svg)](http://godoc.org/github.com/256dpi/jsonapi)
[![Release](https://img.shields.io/github/release/256dpi/jsonapi.svg)](https://github.com/256dpi/jsonapi/releases)**A fundamental and extendable JSON API library for Go.**
Package [`jsonapi`](http://godoc.org/github.com/256dpi/jsonapi) provides structures and functions to implement [JSON API](http://jsonapi.org) compatible APIs. The library can be used with any framework and is built on top of the standard Go http library.
## Extensions
### Custom Actions
The package supports the non-standard but widely adopted "custom actions" extension to support the following patterns:
```
GET /posts/highlighted
DELETE /posts/cache
POST /posts/1/publish
DELETE /posts/1/history
```### Cursor Pagination
The package supports the non-standard but documented ["cursor pagination"](https://jsonapi.org/profiles/ethanresnick/cursor-pagination) profile.
## Examples
The testing [server](https://github.com/256dpi/jsonapi/blob/master/server.go) implements a basic API server using the standard HTTP package.
## Installation
Get the package using the go tool:
```bash
$ go get -u github.com/256dpi/jsonapi/v2
```## License
The MIT License (MIT)
Copyright (c) 2016 Joël Gähwiler