mirror of
https://github.com/json-iterator/go.git
synced 2025-06-03 22:27:26 +02:00
decoder/encoder;float precision doc
This commit is contained in:
parent
cee09816e3
commit
6f50f15678
@ -9,10 +9,10 @@ import (
|
|||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Decoder is an internal type registered to cache as needed.
|
||||||
// Don't confuse jsoniter.Decoder with json.Decoder.
|
// 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).
|
// For json.Decoder's adapter, refer to jsoniter.AdapterDecoder(todo link).
|
||||||
//
|
//
|
||||||
// Reflection on type to create decoders, which is then cached
|
// 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
|
// 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
|
// 1. create instance of new value, for example *int will need a int to be allocated
|
||||||
@ -22,8 +22,9 @@ import (
|
|||||||
type Decoder interface {
|
type Decoder interface {
|
||||||
decode(ptr unsafe.Pointer, iter *Iterator)
|
decode(ptr unsafe.Pointer, iter *Iterator)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Encoder is an internal type registered to cache as needed.
|
||||||
// Don't confuse jsoniter.Encoder with json.Encoder.
|
// 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).
|
// For json.Encoder's adapter, refer to jsoniter.AdapterEncoder(todo godoc link).
|
||||||
type Encoder interface {
|
type Encoder interface {
|
||||||
isEmpty(ptr unsafe.Pointer) bool
|
isEmpty(ptr unsafe.Pointer) bool
|
||||||
|
Loading…
x
Reference in New Issue
Block a user