Skip to content

Revisit json < 3.0 dependency constraint #178

Description

@Jack12816

PR #176 introduced the following dependency constraint in grape-swagger-rails.gemspec:

# Supported Rails versions use JSON APIs removed in JSON 3 (quirks_mode and positional parse options).
spec.add_dependency 'json', '>= 2.0', '< 3.0'

This was necessary at the time because the supported Rails versions depended on JSON APIs that were removed or changed in JSON 3.

Since then, newer Rails versions have been released, including Rails 8.1.x, which is now part of the supported/tested matrix for grape-swagger-rails.

Is the < 3.0 upper bound still necessary for the Rails versions currently supported by this gem?

If not, it would be useful to remove or relax the constraint so applications using newer Rails versions can also upgrade to JSON 3.x without Bundler conflicts.

Related: #176

Activity

  1. moskvin commented on Oct 2, 2026

    @moskvin
    Contributor

    Fixed in #179 and released in 2.0.0: the json < 3.0 cap is gone, so JSON 3 is now allowed. The minimum Rails is now 8.1.4, the first version that works with JSON 3. If you're on older Rails, use 1.x. Thanks @Jack12816 !

  2. Jack12816 commented on Oct 2, 2026

    @Jack12816
    ContributorAuthor

    Thank you @moskvin ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions