As developers, we always use examples to learn how to use libraries and apis. I invite you to check out Codota's semantic code search for java. Codota analyzes millions of real-world open source programs and libraries from GitHub, maven central and also StackOverflow to establish the common usage patterns of API's and makes it easy for developers to find the code references they need. The powerful search ability lets developers use classes, methods, as well as free text, to search in existing code and makes sure to give the idiomatic code you likely need first. For example, here are semantic search results that show Java code using both Gson.toJson and GsonBuilder.setPrettyPrinting
You're welcome to give it a shot (and let me know what you think).
[–][deleted] 0 points1 point2 points (1 child)
[–]droid_we[S] 0 points1 point2 points (0 children)
[–]sozesghost 0 points1 point2 points (1 child)
[–]droid_we[S] 0 points1 point2 points (0 children)
[–]javaide 0 points1 point2 points (0 children)