JuliaData / JuliaData/StructTypes.jl
`Real` does not deserialize
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 86
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
Julia Version: 1.7.2.
I see that Real is supposed to be StructTypes.NumberType(), but it can't actually deserialize:
julia> JSON3.read("456", Real)
ERROR: ArgumentError: invalid JSON at byte position 1 while parsing type Real: ExpectedOpeningObjectChar
456
julia> JSON3.read("456", Union{Integer, AbstractFloat})
456.0
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
Reproduce the issue with JSON3.read("456", Real) and compare it with JSON3.read("456", Union{Integer, AbstractFloat}); the report identifies StructTypes.NumberType() as the relevant type description. Trace how Real is handled during deserialization and verify that the reported Real input succeeds without the ExpectedOpeningObjectChar error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100