# Type agnostic serialisation and deserialisation

**URL:** <https://discourse.julialang.org/t/type-agnostic-serialisation-and-deserialisation/138445>\
**Category:** Tooling\
**Created:** [July 24, 2026, 10:16am UTC](https://discourse.julialang.org/t/type-agnostic-serialisation-and-deserialisation/138445 "2026-07-24T10:16:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcelisgarza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dcelisgarza/32/215951_2.png) [@dcelisgarza](https://discourse.julialang.org/u/dcelisgarza)\
**Post date:** [July 24, 2026, 10:16am UTC](https://discourse.julialang.org/t/type-agnostic-serialisation-and-deserialisation/138445/1 "2026-07-24T10:16:20Z")

</div>

I have searched for a way to serialise and deserialise julia structs that is not JLD2.jl based, and where users don’t have to know the original struct to pass it as an argument to StructUtils.jl. I haven’t found a package that does this so I made a tiny one. Its only dependencies are JSON.jl and StructUtils.jl. It works by registering the types you’d like to serialise/deserialise (for example walking through the types defined by a package) and calling `to_json` or `from_json` to serialise and deserialise instances of your structs.

Before registering it i’d like to know if there is already something that does this so i don’t pollute the general registry with a package that does the same thing as another one.

---

<div class="post-metadata">

**Author:** ![dcelisgarza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dcelisgarza/32/215951_2.png) [@dcelisgarza](https://discourse.julialang.org/u/dcelisgarza)\
**Post date:** [July 24, 2026, 11:42am UTC](https://discourse.julialang.org/t/type-agnostic-serialisation-and-deserialisation/138445/2 "2026-07-24T11:42:26Z")

</div>

I can see why this doesn’t exist. I’m coming up against countless edge cases, I’ll keep it in the backburner and get claude to hunt down bugs. I’ll make an announcement if it turns into a workable thing.

---

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [July 24, 2026, 12:02pm UTC](https://discourse.julialang.org/t/type-agnostic-serialisation-and-deserialisation/138445/3 "2026-07-24T12:02:21Z")

</div>

Be careful not to run into the myriad of problems usually associated with serialization that doesn’t specify the target type 🙂 [Insecure Deserialization | OWASP Foundation](https://owasp.org/www-community/vulnerabilities/Insecure_Deserialization)

---

<div class="post-metadata">

**Author:** ![dcelisgarza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dcelisgarza/32/215951_2.png) [@dcelisgarza](https://discourse.julialang.org/u/dcelisgarza)\
**Post date:** [July 24, 2026, 12:28pm UTC](https://discourse.julialang.org/t/type-agnostic-serialisation-and-deserialisation/138445/4 "2026-07-24T12:28:11Z")

</div>

It’s gated by a user-provided allow list argument for specific modules.
