bencebalogh / avro-schema-registry

Confluent Schema Registry implementation in javascript to easily serialize and deserialize kafka messages
MIT License
28 stars 30 forks source link

logical types support #41

Closed Eli-Goldberg closed 4 years ago

Eli-Goldberg commented 4 years ago

Hi, avsc supports logicalTypes: https://github.com/mtth/avsc/wiki/Advanced-usage#logical-types

However, I've noticed that when I try to deserialize a date object into an int field on the schema (that has logicalType: "timestamp-millis") that fails. Is there a way to pass some some information to avsc to support this?

Thanks

Eli-Goldberg commented 4 years ago

Sorry - I checked and it's easilly supported with adding such a json as the last parameter of encodeMessage: { logicalTypes: { "timestamp-millis": DateType } }. All good here, thanks.