implement JSON multiline parsing (close #35)

Now as independent pull request on a separate branch.