code: @Override
      public JsonElement serialize(PartnerUser user, Type type, JsonSerializationContext context)
      {
          // Convert the user to an array of users as that is what the Partner API expects
          JsonObject obj = new JsonObject();
          JsonArray array = new JsonArray();
          array.add(gson.toJsonTree(user, type));
          obj.add("users", array);
          return obj;
      }
docs: Gson invokes this call-back method during serialization when it encounters a field of the specified type.
  @param user The user being serialized
  @param type The type of the Object to deserialize to
  @param context The JSON serialization context
  @return The JSON data that was serialized