\RESTfulAPI_Serializer
Defines requirements for RESTfulAPI Serializer
- Author: Thierry Francois @colymba thierry@colymba.com
- Copyright: Copyright (c) 2013, Thierry Francois
- License: http://opensource.org/licenses/BSD-3-Clause BSD Simplified
Synopsis
interface RESTfulAPI_Serializer
{
- // methods
- public string getcontentType()
- public string serialize()
- public string formatName()
Methods
public
- formatName() — Format a SilverStripe ClassName of DBField to be used by the client API
- getcontentType() — Return Content-type header definition to be used in the API response
- serialize() — Convert raw data (DataObject, DataList or Array) to JSON ready to be consumed by the client API