-
Notifications
You must be signed in to change notification settings - Fork 106
Open
Description
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 Modules
lower(m::Union{Module,DummyModule}) = throw(ArgumentError("cannot serialize Module $m as JSON"))Metadata
Metadata
Assignees
Labels
No labels