SearchResponse to Json

I have been Googling and searching this site for hours and I don't understand why there is no complete code example for how to create Json from a SearchResponse. I am using the Java API and want to construct my own Json, but there are no examples! There are many written clues that describe in partial terms how to use this or that class, but no actual code examples. Why is that? This seems like pretty crucial information that should be easy to find and use.

Any help? I'm way behind schedule spending so much time searchng... thx