Xcom::decode

Decodes an avro message

&reftitle.description; public `object` `Xcom::decode` `string` `avro_msg` `string` `json_schema`

This method decodes an avro message.

&reftitle.parameters;

`avro_message`

- The binary avro message to be decoded.

`json_schema`

- The avro JSON schema (avpr) to be used in decoding the message.

&reftitle.returnvalues;

Returns a `stdClass` object, or FALSE on failure.

&reftitle.examples;

### `Xcom::decode` example

    <?php

    $schema = file_get_contents('http://api.x.com/ocl/com.x.example.v1/OrderFulfillment/OrderShipped/1.2.0/');
    $xcom = new Xcom();
    $xcom->decode(file_get_contents('php://input'), $schema);

    ?>

&reftitle.seealso;

- `Xcom::encode`