James Gibbs wrote:ah thanks I see what you mean. Now it changes my question how I convert a JsonNode to a Row? maybe I'd be better off with a for loop
I'm probably misunderstanding what you're trying to do here...but
iterator.next() is returning a
Row. If you want a
Row instead of a
JsonNode, don't call
getValueAsNode() on it.
By the way, there's a little trick you can use instead of this
pattern:
You can replace that with:
but even more concise is: