watson.serialize.decorators¶
-
watson.serialize.decorators.
serialize
(func=None, router=None)[source]¶ Serialize an iterable object into a format suitable for encoding.
A user can add additional query string parameters to the URL in order to include/exclude/expand certain fields that are contained in the models being exposed.
Parameters: router (watson.routing.routers.Base) – The router to be used, defaults to the router retrieved from the container Returns: A list/dictionary of values suitable for encoding Usage: