-
Notifications
You must be signed in to change notification settings - Fork 46
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
API design - similar API than JSON.jl #70
Comments
I came here to suggest the same thing 👍 It's not just about the function names. It'd also be more reasonable to handle instances of I can offer to implement these changes. I already know the package from an earlier contribution. |
Oh, and let me point out that JSON.jl allows the user to choose the subtype of
You could even write your own dictionary type to define all of the behavior a JSON file should have when read! That'd be pretty cool to have here, too. |
For the record, parsing YAML into ordered dicts can already be done by e.g. (this is taken from production code and not quite minimal)
but I would appreciate greatly if it could be done without all this overhead. In fact I would support returning OrderedDict by default, although that is a breaking change. |
That's amazing! Looks like this could even be extended to parse arbitrary dictionary types, by making the type of |
Please consider reviewing #87, where I implemented arbitrary dictionary types for |
With the release v0.4.2 it is now possible to parse arbitrary subtypes of Some other advances in the direction of a JSON.jl-like API include |
Are there other elements of the API we'd like to mimic, or can this be closed? |
Adding my 2 cents: Probably not what the OP meant, but unmarshalling into a type can be really powerful https://quinnj.github.io/JSON3.jl/stable/#Read-JSON-into-a-type This concept is also used very successfully by Rust's serde crate. |
YAML has tags to facilitate that, we could do something similar to what pyyaml does Alternatively just using StructTypes would also be really good |
Hello,
maybe YAML.jl could mimic JSON.jl API.
Similar function naming could help to use simply YAML instead of JSON.
Kind regards
The text was updated successfully, but these errors were encountered: