I have a test file which has a json per line. When I do a flatMap on it, it
automatically splits the whole json line on every character. Why does this
happen?

So if I do:


val data=env.readTextFile("file:///home/punit/vik-in")
val j=data.flatMap { x=>x }
j.first(1).print()

This prints "{"

-- 
Thank You

Regards

Punit Naik

Reply via email to