# Shared module constants

**URL:** <https://forum.elixirforum.com/t/shared-module-constants/2799>\
**Category:** Questions\
**Tags:** constants\
**Created:** [December 8, 2016, 4:55pm UTC](https://forum.elixirforum.com/t/shared-module-constants/2799 "2016-12-08T16:55:28Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![sasajuric](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sasajuric/32/991_2.png) [@sasajuric](https://forum.elixirforum.com/u/sasajuric)\
**Post date:** [December 9, 2016, 10:25pm UTC](https://forum.elixirforum.com/t/shared-module-constants/2799/13 "2016-12-09T22:25:13Z")

</div>

> [@benperiton](#):
>
> I was thinking of prepending the name of the file to each key in the JSON file to help namespace it a bit

You could also reach for multiple “nested” modules. Basically, for each input json file name, create the module alias using `Module.concat`, and then define the module dynamically. That way you could invoke say `Const.System.decode/encode`, assuming the input file is `system.json`.

---

_[View the full topic](https://forum.elixirforum.com/t/shared-module-constants/2799)._
