# Candid Serialisation: to\_candid and from\_candid

**URL:** <https://forum.dfinity.org/t/candid-serialisation-to-candid-and-from-candid/13543>\
**Category:** Developers\
**Created:** [June 6, 2022, 4:41pm UTC](https://forum.dfinity.org/t/candid-serialisation-to-candid-and-from-candid/13543 "2022-06-06T16:41:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gabriel](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/gabriel/32/546_2.png) [@Gabriel](https://forum.dfinity.org/u/Gabriel)\
**Post date:** [June 6, 2022, 4:41pm UTC](https://forum.dfinity.org/t/candid-serialisation-to-candid-and-from-candid/13543/1 "2022-06-06T16:41:52Z")

</div>

In the light of the new candid serialisation I thought I’d share a simple example to serialise/deserialise a type.

> <https://gist.github.com/gabrielnic/fa5dfd8af9928636dae2737a8de014db>

The debug will print: `[Canister rrkah-fqaaa-aaaaa-aaaaq-cai] ?{num = 1; text = "test"}`

Hope this help others.

---

<div class="post-metadata">

**Author:** ![mbeekman](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/mbeekman/32/2675_2.png) [@mbeekman](https://forum.dfinity.org/u/mbeekman)\
**Post date:** [July 5, 2022, 8:05am UTC](https://forum.dfinity.org/t/candid-serialisation-to-candid-and-from-candid/13543/2 "2022-07-05T08:05:23Z")

</div>

cross referencing for the other explorers … a.k.a. the curious and confused …

> [@Motoko Serialization](https://forum.dfinity.org/t/motoko-serialization/9954/32):
>
> Holy guacamole … seems to be exactly what I am looking for … hard to find, but for the next person along the same path … here is a direct to the doc on it slight_smile (fyi - the forum strips the #candid-serialization … search for “Candid Serialization” in this page … ) Muchas gracias @icme (a.k.a. Canscale) … and again thanks to @jzxchiang @timo upside_down_face going to try it right now …

thanks again @Gabriel … helpful indeed 🙂
