You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Vishal Surana <vi...@moengage.com> on 2022/10/28 14:45:51 UTC

When should we use flink-json instead of Jackson directly?

I've been using Jackson to deserialize JSON messages into Scala classes and
Java POJOs. The object mapper is heavily customized for our use cases. It
seems that flink-json internally uses Jackson as well and allows for
injecting our own mappers. Would there be any benefit of using flink-json
instead?

-- 
Thanks,
Vishal

Re: When should we use flink-json instead of Jackson directly?

Posted by Yaroslav Tkachenko <ya...@goldsky.com>.
Hey Vishal,

I guess you're using the DataStream API? In this case, you have more
control over data serialization, so it makes sense to use custom
serialization logic.

IMO, flink-json (as well as flink-avro, flink-csv, etc.) is really helpful
when using Table API / SQL API, because it contains the formats that can be
used when defining new tables.

On Fri, Oct 28, 2022 at 9:46 AM Vishal Surana <vi...@moengage.com> wrote:

> I've been using Jackson to deserialize JSON messages into Scala classes
> and Java POJOs. The object mapper is heavily customized for our use cases.
> It seems that flink-json internally uses Jackson as well and allows for
> injecting our own mappers. Would there be any benefit of using flink-json
> instead?
>
> --
> Thanks,
> Vishal
>