I attempting to take a response from a REST service that queries an instance of MongoDB and parse the response into a Java object. The web service returns the response with a MIME type of html with a newline character separating each record that is returned (although I have the ability to adjust what the service returns). What is the easiest/most efficient way for converting the BSON response into a Java object? I have already created a template class in Java to store the data.
Thanks in advance!
edit: A colleague suggested to me using the MongoDB Java driver's BSON parsing utilities in the webservice itself and then returning a nicely formatted HTML string. This still leaves me with parsing to do in my application, but will function as a workaround for the time being. Still looking for a way to easily deserialize the BSON response to a Java object.