Fix AVLTree MarshalJSON() Bug

This commit is contained in:
huangqian
2021-11-27 18:08:48 +08:00
parent b0eb76359e
commit 478f901595

View File

@ -781,7 +781,7 @@ func output(node *AVLTreeNode, prefix string, isTail bool, str *string) {
// MarshalJSON implements the interface MarshalJSON for json.Marshal.
func (tree *AVLTree) MarshalJSON() ([]byte, error) {
return json.Marshal(tree.Map())
return json.Marshal(tree.MapStrAny())
}
// getComparator returns the comparator if it's previously set,