Skip to content
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

Update library to reflect the fact it is Ruby's default JSON implementation? #348

Closed
zverok opened this issue Mar 8, 2018 · 2 comments
Closed

Comments

@zverok
Copy link
Contributor

zverok commented Mar 8, 2018

While trying to make small docs update PR I found out the next facts that probably should be addressed:

  • The repo has no indication that it is the default Ruby's JSON implementation, it just states that "it is an implementation" (therefore I falsely believed that upstream for stdlib json is ruby/ruby repo, and this one is just a pre-Ruby 2 standalonge gem);
  • The json gem and json stdlib share some, but not all, code and docs, which lead to the weird effects:
    • the whole thing about two implementation (C and pure) has an effect on design and docs, but "pure" implementation is not imported into Ruby trunk, which, for example, renders documentation pieces like this:
      image
      (JSON::Pure::Generator is not a thing in stdlib);
    • moreover, considering no need for two implementations, the library code and interface can be simplified significantly (no .generator and .parser attributes, no need to have a separate Common module and so on);
    • most of the detailed docs on gem usage and examples are in README, but not in JSON module's RDoc, and are not accessible from the standard library docs

Is it possible to somehow "freezing" the fact that json gem for future Ruby versions should only be available through stdlib, and simplify the library accordingly?

@byroot
Copy link
Member

byroot commented Oct 18, 2024

I don't quite know how to action this, so feel free to open PR so it's more concrete.

For the link with Ruby, now that the repo has moved I think it's more evident.

@byroot byroot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2024
@zverok
Copy link
Contributor Author

zverok commented Oct 18, 2024

Yeah, the thing with confusing standard docs due to two generators is still relevant:
image

...but since 2018 I came to understanding that it is not that simple.
I’ll try to look into improving the approach to the documentation in upcoming months, as the gem now is in active maintenance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants