# Payload visualisation in UI with pure protobuf (not json/protobuf) encoding

**URL:** <https://community.temporal.io/t/payload-visualisation-in-ui-with-pure-protobuf-not-json-protobuf-encoding/10284>\
**Category:** Community Support\
**Tags:** go-sdk, web-ui\
**Created:** [December 4, 2023, 6:36pm UTC](https://community.temporal.io/t/payload-visualisation-in-ui-with-pure-protobuf-not-json-protobuf-encoding/10284 "2023-12-04T18:36:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vbmithr](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/vbmithr/32/4631_2.png) [@vbmithr](https://community.temporal.io/u/vbmithr)\
**Post date:** [December 4, 2023, 6:36pm UTC](https://community.temporal.io/t/payload-visualisation-in-ui-with-pure-protobuf-not-json-protobuf-encoding/10284/1 "2023-12-04T18:36:11Z")

</div>

I use Temporal in OCaml with a custom SDK. My protobuf library does not have any way to encode protobuf in the special JSON encoding of protobuf defined in the spec. I however want to use protobuf to share my types between Go and OCaml, because most of my activities are in OCaml and most workflow definitions are in Go.

Is there any way to have the UI display a meaningful string serialisation (possibly JSON) of my protobuf payloads? I looked at codec server docs but it seems only for pure compression/encryption without context, i.e. the server does not know what is the type (in the protobuf sense) of the data it is operating on.

_Edit_: Seems like there is a way to manage something with the codec server exploiting payload metadata like messageType metadata fields? Not sure if the Go SDK adds them by default.

Best,  
Vincent

---

<div class="post-metadata">

**Author:** ![Chad\_Retz](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/chad_retz/32/1396_2.png) [@Chad\_Retz](https://community.temporal.io/u/Chad_Retz)\
**Post date:** [December 4, 2023, 7:14pm UTC](https://community.temporal.io/t/payload-visualisation-in-ui-with-pure-protobuf-not-json-protobuf-encoding/10284/2 "2023-12-04T19:14:57Z")

</div>

> [@vbmithr](#):
>
> Is there any way to have the UI display a meaningful string serialisation (possibly JSON) of my protobuf payloads?

There is no way to view a user-friendly form of protobuf given a binary-serialized protobuf unless you have all of the proto definitions used to make it up. Protobuf is not like schemaless protocols (e.g. json and msgpack) that do have human readable forms. The UI does not have the schema you’re using.

> [@vbmithr](#):
>
> I looked at codec server docs but it seems only for pure compression/encryption without context, i.e. the server does not know what is the type (in the protobuf sense) of the data it is operating on.

Compression and encryption are the common use case, but you can technically use it for a human-readable form of your payloads. The `messageType` field in the payload is the fully qualified proto name. Go _does_ add it by default.

---

<div class="post-metadata">

**Author:** ![vbmithr](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/vbmithr/32/4631_2.png) [@vbmithr](https://community.temporal.io/u/vbmithr)\
**Post date:** [December 4, 2023, 7:50pm UTC](https://community.temporal.io/t/payload-visualisation-in-ui-with-pure-protobuf-not-json-protobuf-encoding/10284/3 "2023-12-04T19:50:51Z")

</div>

Great, thanks. Seems the most promising route for me!

---

<div class="post-metadata">

**Author:** ![Chad\_Retz](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/chad_retz/32/1396_2.png) [@Chad\_Retz](https://community.temporal.io/u/Chad_Retz)\
**Post date:** [December 4, 2023, 7:52pm UTC](https://community.temporal.io/t/payload-visualisation-in-ui-with-pure-protobuf-not-json-protobuf-encoding/10284/4 "2023-12-04T19:52:30Z")

</div>

Happy to help. And if you ever have any public code/links to share with Temporal + OCaml use, we would love to see it!

---

<div class="post-metadata">

**Author:** ![vbmithr](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/vbmithr/32/4631_2.png) [@vbmithr](https://community.temporal.io/u/vbmithr)\
**Post date:** [December 4, 2023, 7:54pm UTC](https://community.temporal.io/t/payload-visualisation-in-ui-with-pure-protobuf-not-json-protobuf-encoding/10284/5 "2023-12-04T19:54:52Z")

</div>

I will release the SDK when I’ll be a bit less in a rush 🙂
