fastjson JSON.parse doesn't conform with ES2015 for Map object for iteration order

gab6jxml  于 2021-11-27  发布在  Java
关注(0)|答案(2)|浏览(233)
Since ECMAScript 2015, using the Map object could be an alternative. A Map shares some similarities with an Object and guarantees the keys order:

A Map iterates its elements in insertion order, whereas iteration order is not specified for Objects.

Consider using LinkedHashMap instead of HashMap/TreeMap for internal default implementation.

djp7away

djp7away1#

JSON.parseObject("...", Feature.OrderedField)
xlpyo6sf

xlpyo6sf2#

got it, thanks, however, any plan to make ES2015 conform behavior?

相关问题