You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by Flavio Pompermaier <po...@okkam.it> on 2015/10/20 09:12:51 UTC

Re: Parsing JSON

The easiest way is to have each json object in a single line so you could
use the env.readTextFile method..
On 20 Oct 2015 09:03, "Papp, Stefan" <St...@teradata.com> wrote:

> Hi,
>
>
> I want to process data with JSON. Meaning, I have to receive JSON data and
> prepare this data for analytics. In the beginning, we might receive this
> data via files, but I assume soon we will switch to a streaming variant.
>
> What is currently the best recommended practice with Flink?
>
> Thank you!
>
> Stefan
>
>

Re: Parsing JSON

Posted by Martin Junghanns <m....@mailbox.org>.
An example can be found here:

Code to read JSON from line:

https://github.com/dbs-leipzig/gradoop/blob/master/gradoop-flink/src/main/java/org/gradoop/io/json/JsonReader.java#L57

How it is called:

https://github.com/dbs-leipzig/gradoop/blob/master/gradoop-flink/src/main/java/org/gradoop/model/impl/EPGMDatabase.java#L237

Best,
Martin

On 20.10.2015 09:12, Flavio Pompermaier wrote:
> The easiest way is to have each json object in a single line so you could
> use the env.readTextFile method..
> On 20 Oct 2015 09:03, "Papp, Stefan" <St...@teradata.com> wrote:
> 
>> Hi,
>>
>>
>> I want to process data with JSON. Meaning, I have to receive JSON data and
>> prepare this data for analytics. In the beginning, we might receive this
>> data via files, but I assume soon we will switch to a streaming variant.
>>
>> What is currently the best recommended practice with Flink?
>>
>> Thank you!
>>
>> Stefan
>>
>>
>