JSON.jl icon indicating copy to clipboard operation
JSON.jl copied to clipboard

Reader generalization

Open TotalVerb opened this issue 8 years ago • 1 comments

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 and Inf)
  • #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)

TotalVerb avatar Sep 10 '16 19:09 TotalVerb

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.

dnadlinger avatar Aug 03 '18 13:08 dnadlinger