I have an object with unknown values, say
{
"data": [
{"a":...,
"dont_know_what_else_is_here":....}
]
}
And I just want to store the value of “data” as a string into a variable/database.
How should I read it from the streaming API?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Provided that you have already read this object into
JsonNode, you can do it like this:UPD: since you’re using a streaming parser, this example on Jackson usage might help.
UPD: the method name is now textValue() – docs