From 6f50f156788c49594962101058a8de177ca38f7c Mon Sep 17 00:00:00 2001 From: Fei Ni Date: Sun, 11 Jun 2017 16:30:31 +0800 Subject: [PATCH] decoder/encoder;float precision doc --- feature_reflect.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/feature_reflect.go b/feature_reflect.go index 7090535..4bdf461 100644 --- a/feature_reflect.go +++ b/feature_reflect.go @@ -9,10 +9,10 @@ import ( "unsafe" ) +// Decoder is an internal type registered to cache as needed. // Don't confuse jsoniter.Decoder with json.Decoder. -// jsoniter.Decoder/Encoder are an internal types registered to cache as needed. // For json.Decoder's adapter, refer to jsoniter.AdapterDecoder(todo link). -// +// // Reflection on type to create decoders, which is then cached // Reflection on value is avoided as we can, as the reflect.Value itself will allocate, with following exceptions // 1. create instance of new value, for example *int will need a int to be allocated @@ -22,8 +22,9 @@ import ( type Decoder interface { decode(ptr unsafe.Pointer, iter *Iterator) } + +// Encoder is an internal type registered to cache as needed. // Don't confuse jsoniter.Encoder with json.Encoder. -// jsoniter.Decoder/Encoder are an internal types registered to cache as needed. // For json.Encoder's adapter, refer to jsoniter.AdapterEncoder(todo godoc link). type Encoder interface { isEmpty(ptr unsafe.Pointer) bool