refactor(json): make jsonite optional with build tags (#1026)
* refactor(json): Restore gin support for app engine Create new folder to support multiple json package. restore gin support for app engine (disable jsonite through tags) use jsoniter $ go build -tags=jsoniter . use default json $ go build . Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * rename json file. Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * docs(json): add build tags document. * fix(docs): markdown format. * fix(json): missing space.
This commit is contained in:
committed by
Javier Provecho Fernandez
parent
7180f2ba62
commit
ce670a6497
@ -88,7 +88,6 @@ BenchmarkZeus_GithubAll | 2000 | 944234 | 300688 | 2648
|
||||
- [x] Battle tested
|
||||
- [x] API frozen, new releases will not break your code.
|
||||
|
||||
|
||||
## Start using it
|
||||
|
||||
1. Download and install it:
|
||||
@ -141,6 +140,14 @@ $ curl https://raw.githubusercontent.com/gin-gonic/gin/master/examples/basic/mai
|
||||
$ go run main.go
|
||||
```
|
||||
|
||||
## Build with [jsoniter](https://github.com/json-iterator/go)
|
||||
|
||||
Gin use `encoding/json` as default json package but you can change to [jsoniter](https://github.com/json-iterator/go) by build from other tags.
|
||||
|
||||
```sh
|
||||
$ go build -tags=jsoniter .
|
||||
```
|
||||
|
||||
## API Examples
|
||||
|
||||
### Using GET, POST, PUT, PATCH, DELETE and OPTIONS
|
||||
|
Reference in New Issue
Block a user