Closed geazi-anc closed 3 months ago
yes, it is ok to use any other library to parse JSON string into a case class instance. I have never used flink-json. The problems you had are probably related to the support of Scala in the first place, just guessing here.
Thank you so much for your answer, @novakov-alexey! And congrats for this awesome library. Please keep it up to date :).
Hello, everyone! I was trying out Apache Flink at the first time with this awesome library, and I built a pipeline that reads data from a Pub/Sub topic, converts to a JSON format, transforms it and loads to another Pub/Sub topic.
However, I had a lot of problems to deserialize the JSON string messages to a case class. Firstly, I used the flink-json module to deserializers, but it didn't work for me. So, I thought of using another way to deserializer JSON messages to a ccase class.
In this way, I used Upickle to deserialize JSON strings to case classes, and it worked prefectly! But I still have a question: I'll have a performance degradation using uPickle to deserialize JSON instead of using flink-json library?
Is below a simple data pipeline that reads JSON strings from a socket (such as broker), and releases the JSON strings to case classes:
In short, it's ok to work this way to deserialize JSON strings to case classes, instead of using flink-json module? With uPickle, the code is cleaner too!
Thanks in advance.