Skip to content

ION Encoding Finalized

Latest

Choose a tag to compare

@jjenkov jjenkov released this 08 Apr 08:34
· 4 commits to master since this release

In this release the ION Element Count field used inside ION Array fields has been replaced with a mandatory ION IntPos field instead. Using an element count IntPos field is now also mandatory inside ION Table fields. The Element Count field will be removed from the ION spec.

Knowing how many elements an array or table has at the beginning, before parsing its elements, makes it possible to pre-allocate an array with the correct number of elements before parsing starts. This eliminates the need for parsing the elements into a temporary List, and copy them into the final array afterwards. This is a bit more optimal.