Fix json reader for lines

It may not provide a perfect solution but it works for our sample demo app.