Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. REST
  3. go-json-rest

go-json-rest

MITGov3.3.2

A thin layer on top of net/http for building fast, scalable RESTful JSON APIs in Go with middleware support.

Visit WebsiteGitHubGitHub
3.5k stars372 forks0 contributors

What is go-json-rest?

Go-Json-Rest is a lightweight Go framework that simplifies building RESTful JSON APIs by providing a thin layer over the standard net/http package. It offers fast routing, middleware support for common functionalities like CORS and authentication, and tools for handling JSON payloads, enabling developers to create scalable APIs with minimal boilerplate.

Target Audience

Go developers building RESTful JSON APIs who want a simple, performant framework with middleware support without heavy abstractions.

Value Proposition

Developers choose Go-Json-Rest for its minimal overhead, compatibility with net/http, and extensible middleware architecture, making it ideal for fast and scalable API development in Go.

Overview

A quick and easy way to setup a RESTful JSON API

Use Cases

Best For

  • Building lightweight RESTful JSON APIs in Go
  • Adding middleware-based features like CORS or authentication to APIs
  • Creating scalable APIs with efficient Trie-based routing
  • Integrating APIs with other net/http handlers or static file servers
  • Developing APIs that require monitoring and statistics endpoints
  • Prototyping JSON APIs quickly with built-in JSON helpers

Not Ideal For

  • Projects requiring GraphQL or real-time WebSocket-first architectures as a core feature
  • Teams needing built-in ORM, database migrations, or extensive tooling out-of-the-box
  • Applications that demand automatic OpenAPI/Swagger documentation generation
  • Large enterprises prioritizing commercial support or a vast ecosystem of plugins

Pros & Cons

Pros

Efficient Trie Routing

Uses a Trie data structure for URL routing, providing fast and scalable performance as highlighted in the README's features section.

Modular Middleware Stack

Offers a composable middleware architecture with built-in options for CORS, authentication, and Gzip, demonstrated in numerous examples like CORS and Basic Auth.

Net/Http Compatibility

Implements the standard net/http Handler interface, allowing seamless integration with other handlers and static file servers, as shown in the 'API and static files' example.

Comprehensive Examples

The README includes over 20 detailed examples from basics to advanced use cases, aiding quick prototyping and reducing learning curve.

Cons

Breaking Version Changes

Migration guides from v1 to v2 and v2 to v3 indicate significant API breaks, which can be disruptive for maintaining or upgrading existing projects.

Limited Built-in Features

Core functionalities like JWT auth or ForceSSL rely on third-party middlewares, increasing dependency management and potential compatibility issues.

Sparse Advanced Documentation

Beyond examples, there is a lack of in-depth guides for complex scenarios, and the godoc documentation is minimal, relying heavily on the README.

Frequently Asked Questions

Quick Stats

Stars3,487
Forks372
Contributors0
Open Issues33
Last commit5 years ago
CreatedSince 2013

Tags

#json-api#net-http#http-server#api-framework#rest-api#web-framework#backend#go#middleware#routing

Built With

G
Go
n
net/http

Links & Resources

Website

Included in

REST3.9k
Auto-fetched 18 hours ago

Related Projects

go-restfulgo-restful

package for building REST-style Web Services using Go

Stars5,115
Forks681
Last commit19 days ago
sleepysleepy

rest for go

Stars669
Forks52
Last commit8 years ago
gocrudgocrud

Go framework to simplify CRUD of structured data using Graph operations

Stars307
Forks23
Last commit7 years ago
go-relaxgo-relax

Framework for building RESTful API's in Go

Stars154
Forks9
Last commit5 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub