You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In GenieFramework we rely on rendering a Module as its String value, which JSON v1 perfectly does. However, v0.21 does throw an error.
In this transition period from JSON3 to JSON we still support JSON 0.21, but we cannot lower Modules as String, because its lowering is hard-coded in Writer.jl
I propose a small patch to allow for specialization of lower(m::Module) without breaking existing behaviour.
lower(m::Module) =throw(ArgumentError("cannot serialize Module $m as JSON"))
to
abstract type DummyModule end# chose a Union type to make it possible to extend lower for Moduleslower(m::Union{Module,DummyModule}) =throw(ArgumentError("cannot serialize Module $m as JSON"))
JSON 0.21 is no longer actively maintained - development focus has moved to v1.x where Module lowering works correctly. PRs for backwards-compatible fixes to 0.21 will be considered, but we recommend upgrading to v1.
We already support JSON v1, it's meant for people who cannot yet upgrade to the latest JSON because they have other dependencies. But if it is urgent, people could leave a message here.
Activity
[-]lower(m::Module) throws in v 0.21[/-][+]lower(m::Module) throws in v0.21[/+]quinnj commentedon Jan 14, 2026
JSON 0.21 is no longer actively maintained - development focus has moved to v1.x where Module lowering works correctly. PRs for backwards-compatible fixes to 0.21 will be considered, but we recommend upgrading to v1.
hhaensel commentedon Jan 27, 2026
We already support JSON v1, it's meant for people who cannot yet upgrade to the latest JSON because they have other dependencies. But if it is urgent, people could leave a message here.
quinnj commentedon Oct 16, 2026
Thanks for the report. This works in JSON 1.x (
JSON.json(Main) == "\"Main\""), and 0.21 is not getting further releases, so I am closing this.[comment generated via AI]