# Decoding Multi Level Json

**URL:** <https://forum.elixirforum.com/t/decoding-multi-level-json/32925>\
**Category:** Questions\
**Tags:** json, jason, elixir-httpoison, multi-level-json, decode\
**Created:** [July 8, 2020, 5:56pm UTC](https://forum.elixirforum.com/t/decoding-multi-level-json/32925 "2020-07-08T17:56:25Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![NobbZ](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/nobbz/32/27235_2.png) [@NobbZ](https://forum.elixirforum.com/u/NobbZ)\
**Post date:** [July 9, 2020, 6:26am UTC](https://forum.elixirforum.com/t/decoding-multi-level-json/32925/6 "2020-07-09T06:26:32Z")

</div>

```ex
Jason.encode(%{
  topic: "dummy",
  msg: Jason.encode(%{a: "message blob"})
})

# or

~s'{"topic":"dummy","msg":#{Jason.encode(Jason.encode(%{a: "message blob"}))}}'

```

These variants should both work. I’m not sure about exact quoting here, so it might be, that you need to wrap the interpolated value in another pair of quotes.

I prefer the first approach for readability.

---

_[View the full topic](https://forum.elixirforum.com/t/decoding-multi-level-json/32925)._
