# What imported TOML files create in Julia

**URL:** <https://discourse.julialang.org/t/what-imported-toml-files-create-in-julia/118733>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [August 28, 2024, 7:52pm UTC](https://discourse.julialang.org/t/what-imported-toml-files-create-in-julia/118733 "2024-08-28T19:52:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![coloradoriverboy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/coloradoriverboy/32/211643_2.png) [@coloradoriverboy](https://discourse.julialang.org/u/coloradoriverboy)\
**Post date:** [August 28, 2024, 7:52pm UTC](https://discourse.julialang.org/t/what-imported-toml-files-create-in-julia/118733/1 "2024-08-28T19:52:14Z")

</div>

I was given the slide below in a presentation to show how Julia creates dictionaries from TOML sections but I think it is incorrect unless I am not understanding , I would think the [SLS] section had two key value pairs and thus created one dictionary with two entries ?

 ![image](https://global.discourse-cdn.com/julialang/original/3X/3/d/3d204fafd9f43c7a61d0ef54a2f402ff0415ebaa.jpeg)

---

<div class="post-metadata">

**Author:** ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)\
**Post date:** [August 28, 2024, 7:57pm UTC](https://discourse.julialang.org/t/what-imported-toml-files-create-in-julia/118733/2 "2024-08-28T19:57:10Z")

</div>

The screenshot looks right, consistent with the [TOML spec](https://toml.io/en/). `[SLS.Core]` creates a `Core` key under the `SLS` map with another map as its value.

---

<div class="post-metadata">

**Author:** ![coloradoriverboy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/coloradoriverboy/32/211643_2.png) [@coloradoriverboy](https://discourse.julialang.org/u/coloradoriverboy)\
**Post date:** [August 28, 2024, 8:20pm UTC](https://discourse.julialang.org/t/what-imported-toml-files-create-in-julia/118733/3 "2024-08-28T20:20:54Z")

</div>

Thank you so much for helping - Do you know what the ex is in the REPL in this example or how I would write a function to call these from a TOML and then how to look at them in Julia like is being done here ?

---

<div class="post-metadata">

**Author:** ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)\
**Post date:** [August 28, 2024, 8:27pm UTC](https://discourse.julialang.org/t/what-imported-toml-files-create-in-julia/118733/4 "2024-08-28T20:27:57Z")

</div>

[The docs of TOML.jl](https://docs.julialang.org/en/v1/stdlib/TOML/) show how to parse a TOML string in Julia. The `ex` in your screenshot is a value produced by `TOML.parse(s)` where `s` is some string containing TOML data, or maybe `TOML.tryparsefile(path)` where `path` points to a toml-formatted file.

---

<div class="post-metadata">

**Author:** ![coloradoriverboy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/coloradoriverboy/32/211643_2.png) [@coloradoriverboy](https://discourse.julialang.org/u/coloradoriverboy)\
**Post date:** [August 28, 2024, 8:36pm UTC](https://discourse.julialang.org/t/what-imported-toml-files-create-in-julia/118733/5 "2024-08-28T20:36:43Z")

</div>

Thank you
