-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
json
issues
#2430
Comments
(4) copy std/json into stew/shims to get the most critical bugfixes to unblock 1.2.10, then (1) or (2) or other more long-term alternatives |
fwiw, I started doing this, but it's good to take a step back and see where it might lead: to a new json library or to keep using upstream json with all its ups and downs - we have a lot of code depending on json, so even just renaming all imports takes a while (I wrote this issue half-way through) |
The lexer module in nim-json-serialization can already be considered as a small stand-alone SAX-like library for parsing json. nim-json-serialization itself support the parsing of "untyped" json nodes through its support for the |
|
#5737 solves this through a rewrite of all relevant code to use |
The
json
module in the std library has several tricky issues:JInt
andJFloat
neither of which exist injson
and neither of which actually coverNumber
in the standardWe have the
json-serialization
library, but it solves a different problem, namely that of mapping Nim types to and from json - it's not so much about implementing json faithfully. It also doesn't implement json numbers.There's a couple of things we can do:
nim-json2
library that implements the standard with "sax" (event based parsing) and "dom" (JsonNode
) - maybe based on faststreams, but that increases complexityjson-serialization
would be updated to use this libraryjson-serialization
library to implement the json standard, then use it in a newnim-json2
library, so as to reuse the low-level parsingstd/json
into stew/shims to get the most critical bugfixes and live with the restThe text was updated successfully, but these errors were encountered: