From JSON to Java API and back

Hi there,

Im using the Java API and I want to know what is the best way to convert the SearchResponse object into JSON format. Also If Im using the JSON API and I receive back a JSON response, is there a way to convert it to a SearchResponse.

Thank you for your time.

Cheers, Petar.