Can anyone help me to deserialize the avro file in react? I tried with avsc npm package but I am now stuck on error.
const avro = require('avsc')
......
avro.createFileDecoder('./abc.avro').on('data', (record) => { console.log(record) })
......
but it shows an error.
TypeError: avro.createFileDecoder is not a function
How to solve this???
That error was because the createFileDecoder function requires another parameter { codecs } Anyway, I read the avro file with createBlobDecoder. This is what I did.
Here, file is the default return value of an input tag in HTML.