Short of any other suggestions, and dependent on how the JSON is being formatted, you may have an option.
The problem, as pointed out in the Dzone article, is that JSON has no end element that you can easily locate when you jump to a split point.
Now if your input JSON has 'pretty' or standard formatting you can take advantage of this in a custom input format implementation.
For example, taking the sample JSON from the Dzone example:
{
"results" :
[
{
"created_at" : "Thu, 29 Dec 2011 21:46:01 +0000",
"from_user" : "grep_alex",
"text" : "RT @kevinweil: After a lot of hard work by ..."
},
{
"created_at" : "Mon, 26 Dec 2011 21:18:37 +0000",
"from_user" : "grep_alex",
"text" : "@miguno pull request has been merged, thanks again!"
}
]
}
with this format, you know (hope?) that each new record starts on a line that has 6 whitespaces and an open bracket. A record ends on a similar format - 6 spaces and a closing bracket.
So your logic in this case: consume lines until you find a line with 6 spaces and an open bracket. Then buffer content until the find the 6 spaces and a closing bracket. Then use whatever JSON deserializer you want to turn that into a java object (or just pass the multiline Text to your mapper.