1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-30 23:23:49 +02:00

feature #384: Specify custom map key sort function

This commit is contained in:
Zach McElrath
2019-07-09 15:57:36 -04:00
parent 27518f6661
commit 3e68b32b9a
5 changed files with 130 additions and 10 deletions

View File

@ -30,6 +30,11 @@ type ValEncoder interface {
Encode(ptr unsafe.Pointer, stream *Stream)
}
// MapKeySorter is used to define a custom function for sorting the keys of maps
type MapKeySorter interface {
Sort(keyA string, keyB string) bool
}
type checkIsEmpty interface {
IsEmpty(ptr unsafe.Pointer) bool
}