JSON.jl
JSON.jl copied to clipboard
Reader generalization
After #165, to implement #168 properly still requires reader support. A similar analogous as done for writers can be done for readers also. The big roadblocks here are:
- unlike for writers, there's no unified
Base
parsing/reading API; https://github.com/JuliaLang/julia/pull/16981 seems to start on this - for writers, the monadic-style composition is clear; for readers, this is less clearcut
TODO list:
- #168 Reading NaN and Inf (support parser with added custom tokens
NaN
andInf
) - #170 Reading JavaScript functions (after seeing token
function
, run custom parsing function) - #130 JSON string literal with interpolation (support parser with added custom token
$
, after which Julia parser is run)
Any progress on this in the meantime? I need to handle a Python-generated file that contains both NaN
as a number (violating the JSON spec) and "NaN" as a string. Currently, I'm using Python's parser via PyCall to get around this, but obviously I'd rather like to avoid that.