Google’s Json Parsing Gson library: What’s the difference between JsonElement and JsonObject?

JsonElement contains common code for all the valid types in JSON:

  • JsonObject
  • JsonArray
  • JsonPrimitive (string, number, boolean)
  • JsonNull

This allows you a write a method that takes a JsonElement that works with any of the above types.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)