lower(m::Module) throws in v0.21
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 360
- Forks
- 113
- Avg merge
- 5d 2h
- Merged PRs (30d)
- 4
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"))
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in Writer.jl at the existing lower(m::Module) definition and review the proposed hh-module patch. Confirm that Module values can be specialized for JSON 0.21 while the existing ArgumentError remains the default behavior, then verify the compatibility case described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100