serializeOpt

Serializes a class extending ModelObject into a JSONObject.

Return

The JSONObject representing the ModelObject.

Parameters

modelObject

The object to be serialized.

serializer

The serializer of the ModelObject class to be used.

The type o the ModelObject class to be serialized from.