[id='protostream_cm_config']
= Using the ProtoStream Marshaller
{brandname} integrates with the ProtoStream API to encode and decode Java
objects into Protocol Buffers (Protobuf); a language-neutral, backwards
compatible format.

.Procedure

. Create implementations of the ProtoStream `SerializationContextInitializer` interface so that {brandname} can marshall your Java objects.
. Configure {brandname} to use the implementations.
+
* Programmatically:
+
[source,java]
----
include::code_examples/ProtoStreamMarshaller.java[]
----
+
* Declaratively
+
[source,xml,options="nowrap",subs=attributes+]
----
include::config_examples/protostream_marshaller.xml[]
----

.Reference

* link:#protostream[Creating Serialization Contexts for ProtoStream Marshalling]
* link:https://developers.google.com/protocol-buffers[Protocol Buffers]
