# The mime type of julia code, and it's usage in show and repr

**URL:** <https://discourse.julialang.org/t/the-mime-type-of-julia-code-and-its-usage-in-show-and-repr/64465>\
**Category:** Internals & Design\
**Created:** [July 11, 2021, 5:06pm UTC](https://discourse.julialang.org/t/the-mime-type-of-julia-code-and-its-usage-in-show-and-repr/64465 "2021-07-11T17:06:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![binary\_cat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/binary_cat/32/19113_2.png) [@binary\_cat](https://discourse.julialang.org/u/binary_cat)\
**Post date:** [July 11, 2021, 5:06pm UTC](https://discourse.julialang.org/t/the-mime-type-of-julia-code-and-its-usage-in-show-and-repr/64465/1 "2021-07-11T17:06:53Z")

</div>

I can’t find anything about it online, and there don’t seem to be any methods using it in julia, so I decided to ask here.

Something like text/julia (or maybe text/x-julia for standard compliance?) is what I would expect.

It would be useful to be able to use `repr(x, "text/julia")` to get a julia expression that evaluates to x. you can often get this with just `show(x)`, but that doesn’t work for everything (eg. Base.TTY).

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [July 11, 2021, 11:07pm UTC](https://discourse.julialang.org/t/the-mime-type-of-julia-code-and-its-usage-in-show-and-repr/64465/2 "2021-07-11T23:07:16Z")

</div>

[https://github.com/JuliaLang/julia/issues/26947](https://github.com/JuliaLang/julia/issues/26947)
