Update README.md

This commit is contained in:
Masaaki Goshima 2020-08-02 17:38:04 +09:00 committed by GitHub
parent 067203cf86
commit 96528bcc62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 50 additions and 36 deletions

View File

@ -5,46 +5,20 @@
Fast JSON encoder/decoder compatible with encoding/json for Go Fast JSON encoder/decoder compatible with encoding/json for Go
# Status # Installation
## Type ```
go get github.com/goccy/go-json
```
Currently supported all types # How to use
## API Replace import statement from `encoding/json` to `github.com/goccy/go-json`
- [ ] `Compact` ```
- [ ] `HTMLEscape` -import "encoding/json"
- [ ] `Indent` +import "github.com/goccy/go-json"
- [x] `Marshal` ```
- [x] `MarshalIndent`
- [x] `Unmarshal`
- [ ] `Valid`
- [x] `NewDecoder`
- [x] `(*Decoder).Buffered`
- [x] `(*Decoder).Decode`
- [ ] `(*Decoder).DisallowUnknownFields`
- [x] `(*Decoder).InputOffset`
- [x] `(*Decoder).More`
- [x] `(*Decoder).Token`
- [ ] `(*Decoder).UseNumber`
- [x] `Delim`
- [x] `(Delim).String`
- [x] `NewEncoder`
- [x] `(*Encoder).Encode`
- [x] `(*Encoder).SetEscapeHTML`
- [x] `(*Encoder).SetIndent`
### Error
- [ ] `InvalidUTF8Error`
- [x] `InvalidUnmarshalError`
- [x] `MarshalerError`
- [x] `SyntaxError`
- [ ] `UnmarshalFieldError`
- [ ] `UnmarshalTypeError`
- [x] `UnsupportedTypeError`
- [x] `UnsupportedValueError`
# Benchmarks # Benchmarks
@ -101,6 +75,46 @@ $ go test -bench .
<img src="https://user-images.githubusercontent.com/209884/89118920-c28eec80-d4e4-11ea-91cc-424cfe726539.png"></img> <img src="https://user-images.githubusercontent.com/209884/89118920-c28eec80-d4e4-11ea-91cc-424cfe726539.png"></img>
# Status
## Type
Currently supported all types
## API
- [ ] `Compact`
- [ ] `HTMLEscape`
- [ ] `Indent`
- [x] `Marshal`
- [x] `MarshalIndent`
- [x] `Unmarshal`
- [ ] `Valid`
- [x] `NewDecoder`
- [x] `(*Decoder).Buffered`
- [x] `(*Decoder).Decode`
- [ ] `(*Decoder).DisallowUnknownFields`
- [x] `(*Decoder).InputOffset`
- [x] `(*Decoder).More`
- [x] `(*Decoder).Token`
- [ ] `(*Decoder).UseNumber`
- [x] `Delim`
- [x] `(Delim).String`
- [x] `NewEncoder`
- [x] `(*Encoder).Encode`
- [x] `(*Encoder).SetEscapeHTML`
- [x] `(*Encoder).SetIndent`
### Error
- [ ] `InvalidUTF8Error`
- [x] `InvalidUnmarshalError`
- [x] `MarshalerError`
- [x] `SyntaxError`
- [ ] `UnmarshalFieldError`
- [ ] `UnmarshalTypeError`
- [x] `UnsupportedTypeError`
- [x] `UnsupportedValueError`
# License # License