# give/4.17.0/vendor/paypal/paypalhttp/lib/PayPalHttp/Serializer.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.17.0. 30 lines.

- Page: https://pluginprobe.com/plugins/give/4.17.0/code/vendor/paypal/paypalhttp/lib/PayPalHttp/Serializer.php
- Raw: https://pluginprobe.com/plugins/give/4.17.0/raw/vendor/paypal/paypalhttp/lib/PayPalHttp/Serializer.php
- Modified: 2020-10-28T01:02:06+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.17.0/code/vendor/paypal/paypalhttp/lib/PayPalHttp/Serializer.php#L10-L20`.

```php
<?php

namespace PayPalHttp;

/**
 * Interface Serializer
 * @package PayPalHttp
 *
 * Used to implement different serializers for different content types
 */
interface Serializer
{
    /**
     * @return string Regex that matches the content type it supports.
     */
    public function contentType();

    /**
     * @param HttpRequest $request
     * @return string representation of your data after being serialized.
     */
    public function encode(HttpRequest $request);

    /**
     * @param $body
     * @return mixed object/string representing the de-serialized response body.
     */
    public function decode($body);
}

```
