[id='hotrod_marshalling']
= Configuring Custom Marshallers
Configure Hot Rod clients to use custom marshallers.

.Procedure

. Implement the `org.infinispan.commons.marshall.Marshaller` interface.
. Specify the fully qualified name of your class in your Hot Rod client configuration.
. Add your Java classes to the {brandname} deserialization whitelist.
+
In the following example, only classes with fully qualified names that contain
`Person` or `Employee` are allowed:
+
[source,java]
----
ConfigurationBuilder clientBuilder = new ConfigurationBuilder();
clientBuilder.marshaller("org.infinispan.example.marshall.CustomMarshaller")
  .addJavaSerialWhiteList(".*Person.*", ".*Employee.*");
  ...
----

.Reference

* link:{javadocroot}/org/infinispan/commons/marshall/Marshaller.html[org.infinispan.commons.marshall.Marshaller]
* link:{dev_docs}#custom_marshallers[Using Custom Marshallers]
* link:{dev_docs}#deserialization_whitelist[Adding Java Classes to Deserialization White Lists]
