I encountered a problem that I really need to write the data in the order in which they were decoded, and I would not like to create additional structures, because there are a lot of them will turn out due to a huge number of different types.
The idea is to add the ability to write NBT data in the prescribed order, in my case, the map elements must be sorted in alphabetical order