Ubospica opened a new pull request, #16863:
URL: https://github.com/apache/tvm/pull/16863

   Previously picojson define `object` as an alias of `std::unordered_map`. 
That means when parsing json, the order of keys in objects are uncertain and 
dependent on implementation. This makes it inconvenient for certain 
applications, e.g. in LLM generation output, we wish the order of keys the same 
as the order in the json file.
   
   This PR implements a ordered hashmap `ordered_hashmap` that 1) maintains the 
order in which the elements are inserted, and 2) have the same interface as 
`std::unordered_map`. Picojson will define object as an alias of 
`ordered_hashmap`, so the order of the input json is maintained when parsing.
   
   Macro `PICOJSON_USE_ORDERED_OBJECT` controls whether object uses the ordered 
version or the unordered version. It is set by default.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to