Skip to content

v8.0.0

Compare
Choose a tag to compare
@actgardner actgardner released this 08 May 20:21
· 30 commits to master since this release

Major version 8.0.0 includes improvements to better conform to the Avro spec, as well as some user-requested quality-of-life changes:

The New<Type> constructors for records set the default values for each field.

JSON deserialization better conforms to the Avro specification. This includes resolving aliases for JSON fields, fixing union type name encoding to be fully qualified, and setting fields to their default values when deserializing JSON data.

JSON encoding of bytes types is now correctly handled by using a custom Bytes type, which is an alias for []byte. Previously these fields serialized and deserialized using the Golang default encoding, which was base64. bytes are now serialized as a string of UTF escape sequences (ex. \u00fe) with one sequence per byte.

Similar to the above, the default value for fields with the bytes type is now correctly handled. Previously a codepoint above \u009f would be converted to their two byte UTF-8 encoding. We now correctly parse values like \u00fe as a single byte (254).

Aliases for fields and types are now resolved according to the specification - aliases in the reader schema are used to match writer names exclusively. Previously we would match fields or types if the writer aliases matched the reader name, or if a name within the same version of the schema matched the alias.

Deserialize convenience methods are now generated for unions to make it easier to parse data where the root type is a union.

The testing framework has been overhauled to provide better coverage for JSON encoding and schema evolution.