I have a question about toJson function in google.Gson library.
I read online here that I can use it like this toJson(_) what does the underscore sign mean? In the documentation the parameter represents the target type, can you please explain more about what should I pass if I just want to convert log data to Json?
Here's the code I'm asking about:
private var gson = new Gson()
val tweetStream = TwitterUtils.createStream(ssc, Utils.getAuth)
.map(gson.toJson(_))