Almost every aspect of the client is configurable. Most users only need to configure a few parameters to suit their needs, but it is possible to completely replace much of the internals if required.

Custom configuration is accomplished before the client is instantiated, through the ClientBuilder class. You can find all the configuration options and check sample code that helps you replace the various components.

To learn more about JSON in PHP, read Dealing with JSON arrays and objects in PHP.