El domingo, 21 de febrero de 2016, 9:35:54 (UTC-5), Eric Forgy escribió:
>
> julia> @enum Test T1 T2 T3
>
> julia> JSON.json(T1)
> "{}"
>
> How can I get this to print "\"T1\""?
>
> I've been experimenting with "show" and "print", but can't seem to get it
> to work.
>
> Thanks for any help.
>
> PS: I already filed an issue
> <https://github.com/JuliaLang/JSON.jl/issues/135> (that references this
> post), but think this is a more basic Julia question so asking here too.
>
You can do it by just defining a new method of the `JSON.json` function.
I've put my answer in the issue.