deserilize nested json

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

deserilize nested json

Hung
This post was updated on .
Hi Flink users,

Would it be possible to deserialize nested json by providing
TypeInformation? or should we transform nested json to plain json?

final TypeInformation<Row> typeInformation = Types.ROW(
                                new String[] {"orderNumber", "data.sales", "data.country"},
                                new TypeInformation<?>[] { Types.STRING(), Types.DOUBLE(), Types.INT()}
                );

Cheers,

Sendoh



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: deserilize nested json

Fabian Hueske-2
Hi Sendoh,

it certainly possible to deserialize nested JSON.
However, the JsonRowDeserializationSchema doesn't support it yet.

You would either have to extend the class or implement a new one.

Best, Fabian

2017-12-08 12:33 GMT+01:00 Sendoh <[hidden email]>:
Hi Flink users,

Would it be possible to deserialize nested json by providing
TypeInformation? or should we transform nested json to plain json?

final TypeInformation<Row> typeInformation = Types.ROW(
                                new String[] {"orderNumber", "sales", "country"},
                                new TypeInformation<?>[] { Types.STRING(), Types.DOUBLE(), Types.INT()}
                );

Cheers,

Sendoh



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/