[id='configuring_protobuf_encoding-{context}']
= Storing Data in Protobuf Format
Storing data in the cache as Protobuf encoded entries provides a platform
independent configuration that enables you to perform cache operations from any
client.

[NOTE]
====
When you configure indexing for {brandname} Search, {brandname} automatically
stores keys and values with the `application/x-protostream` media type.
====

.Procedure

. Specify `application/x-protostream` as the MediaType for keys and values as follows:
+
[source,xml,options="nowrap",subs=attributes+]
----
include::config_examples/encoding_protostream.xml[]
----
+
. Configure your clients.

Hot Rod clients must register Protocol Buffers schema definitions that describe
entities and client marshallers.

{brandname} converts between `application/x-protostream` and `application/json`
so REST clients only need to send the following headers to read and write JSON
formatted data:

* `Accept: application/json` for read operations.
* `Content-Type: application/json` for write operations.

.Reference

* link:{dev_docs}#storage_formats_client_interop-data[Storage Formats and Client Interoperability]
* link:{dev_docs}#protostream_cm_config[Using the ProtoStream Marshaller]
* link:{dev_docs}#[Marshalling Custom Java Objects with ProtoStream]
