code: public static SanitizedContent serializeObject(Gson gson, Object obj) {
      return ordainJson(gson.toJson(obj));
    }
docs: Generate sanitized js content with provided Gson serializer.
  
  @param gson A Gson serializer.
  @param obj The object to render as gson.
  @return SanitizedContent containing the object rendered as a json string.