Releases: onox/json-ada
v3.0.1
v3.0.0
A parser will now use a memory allocator to store JSON values of a
JSON array or the key-value pairs of a JSON object in an array of
vectors. The number of vectors does not depend on the size of the parsed
JSON text, but depends on the maximum nesting depth, specified when
instantiating JSON.Types
.
JSON_Value
no longer contains an Unbounded_String
but instead contains
the offset and length of the string in the original stream. This avoids
copying the string and allocating many Unbounded_String
.
The type Stream_Object
has been removed since it does not allow random
access, which is needed for fetching strings from the stream.
A speed up of more than 4x compared to v2.0.0 or 17x compared to v1.0.0
has been achieved.
Changes
- Modify how parsed JSON values are stored to speed up parsing
- Avoid copying strings for string tokens
- Remove
Stream_Object
because of no support for random access
v2.0.0
JSON_Value
is now a non-abstract tagged type with a discriminant Kind
. The 'Class
attribute is no longer used. The type does not need to be converted to JSON_Array_Value
or JSON_Object_Value
in order to iterate over the elements or keys. Parsing large documents is now up to 4x faster.
Future releases may address the usage of the packages Ada.Containers.*
and deal with memory allocations.
Changes
- Refactor JSON.Types and put components in a variant part of JSON_Value
- Rename function Get_Value_Or_Default to Get