flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timur Fayruzov <timur.fairu...@gmail.com>
Subject Re: convert Json to Tuple
Date Tue, 26 Apr 2016 05:13:37 GMT
Normally, Json4s or Jackson+scala plugin work well for json to scala data
structure conversions. However, I would not expect they support a special
case for tuples, since JSON key-value fields would normally convert to case
classes and JSON arrays are converted to, well, arrays. That's being said,
StackOverflow to the rescue:
http://stackoverflow.com/questions/31909308/is-it-possible-to-parse-json-array-into-a-tuple-with-json4s

I didn't try the approach myself, though.

On Mon, Apr 25, 2016 at 6:50 PM, Alexander Smirnov <
alexander.smirnoff@gmail.com> wrote:

> Hello everybody!
>
> my RMQSource function receives string with JSONs in it.
> Because many operations in Flink rely on Tuple operations, I think it is a
> good idea to convert JSON to Tuple.
>
> I believe this task has been solved already :)
> what's the common approach for this conversion?
>
> Thank you,
> Alex
>

Mime
View raw message