Arbitrary transformations of JSON in Golang
This release adds support for an optional ignore
array in Coalesce()
.
This release adds the ability to delete keys.
This release migrates from the official buger/jsonparser library to the qntfy fork which adds support array indexing support to the Set
command. Kazaam now supports transforms which target the setting of specific elements in arrays as well as prepending or appending to arrays.
This release resolves a bug where only a single UUID would be generated in a specification that required multiple UUIDs due to returning early. The UUID executed was also non-deterministic due to golang's random iteration order for maps.
This release adds an inPlace
option to the shift transform allowing for shuffling of values within the json on top of the source json (ie not starting with a new json document).
This also provides a large bugfix for the UUID transform which previously produced incorrect results.
Release v3.1.1 removes an improperly included binary (#47) and resolves an issue with the test suite which generated failing JSON comparisons due to map randomization (#48).
Release v3.1.0 adds support for two new built-in transforms UUID
(#43) and Timestamp
(#44).
Kazaam is significantly refactored (https://github.com/qntfy/kazaam/pull/40) to use jsonparser as the underlying JSON manipulation library, rather than go-simplejson. This results in a 2-10x improvement in time, memory usage and allocations / op for most benchmarks. See details in https://github.com/qntfy/kazaam/pull/35
Kazaam now takes []byte
as primary transform input rather than simplejson.Json
objects. String methods are still supported without change.
Kazaam no longer provides full JSON validation in all scenarios, but (relatively very slow) IsJson()
method is provided for convenience for users who wish to validate. Also includes experimental IsJsonFast()
method which recursively iterates through a json object/array looking for parser errors (we will likely roll this approach into main IsJson() method in a future release).
Updates from RC2:
[*]
or over
in a transform on empty array will cause index out of bound panic.Updates from RC1:
IsJsonFast()
method which recursively iterates through a json object/array looking for parser errors (we will likely roll this approach into main IsJson() method in a future release)jsonparser