From 96528bcc621fec4c57ce23e947e4a0099b5eb1d2 Mon Sep 17 00:00:00 2001 From: Masaaki Goshima Date: Sun, 2 Aug 2020 17:38:04 +0900 Subject: [PATCH] Update README.md --- README.md | 86 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 50 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index e286b27..7036ee7 100644 --- a/README.md +++ b/README.md @@ -5,46 +5,20 @@ 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` -- [ ] `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` +``` +-import "encoding/json" ++import "github.com/goccy/go-json" +``` # Benchmarks @@ -101,6 +75,46 @@ $ go test -bench . +# 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