public static < T extends MPBase > JsonObject getJsonFromResource ( T resourceObject ) { return ( JsonObject ) gson . toJsonTree ( resourceObject ) ; }
Static method that transforms all attributes members of the instance in a JSON Object .