Closed patarapolw closed 5 years ago
I have found the options. https://stackoverflow.com/questions/20624042/how-to-get-json-element-type-with-gson
JsonElement.asJsonPrimitive.isString
JsonElement.asJsonPrimitive.isNumber
JsonElement.asJsonPrimitive.isBoolean
I also find that
I would be convenient if I don't have to test out how your library works...
Actually, I have got it, but I don't know how fragile it is.
To get the type, use
.javaClass
Also, as a by-product