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

Created on 14 Dec 2016  ·  2Comments  ·  Source: alibaba/fastjson

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.

question

Most helpful comment

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

All 2 comments

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

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

Was this page helpful?
0 / 5 - 0 ratings