Skip to content

json 1.8.6 produces a deprecation on ruby 2.7 #399

Closed

Description

@scudco

https://github.com/flori/json/blob/7f4cfd853f2c919d854fb95548a19980feff17e8/lib/json/common.rb#L155

This line produces the following deprecation message:

<snip>/json-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated

It'd be nice to get a patch-level bump to silence this particular deprecation.

Activity

  1. mike-loopvoc commented on Mar 16, 2020

    @mike-loopvoc

    This same problem occurs in version 2.2. What is strange is that it appears to be immune to setting RUBYOPT='-W:no-deprecated -W:no-experimental' - the deprecation messages print like crazy anyway (and I have seen it suppress the same messages from every other source that was producing them.)

  2. leoplct commented on Jun 8, 2020

    @leoplct

    +1 It appears everywhere

  3. rdp commented on Jun 24, 2020

    @rdp

    Please it's so chatty...

  4. hsbt commented on Jun 25, 2020

    @hsbt
    Member

    I'm not sure what maintenance status about v1.8 by flori as primary owner.

    At least, I have no plan to maintain json-1.8.x in 2020. I suggest to upgrade json-2.3.0

  5. miguelpeniche commented on Oct 14, 2020

    @miguelpeniche

    Any solutions?

  6. hsbt commented on Oct 14, 2020

    @hsbt
    Member

    Use json-2.x.

  7. joevandyk commented on Oct 22, 2020

    @joevandyk

    There's a lot of gems that still require json ~> 1.8... would be very nice to have a 1.8.7 that fixes this particular warning.

  8. airblade commented on Nov 27, 2020

    @airblade

    Using Rails, this seems to get rid of the warnings:

    # config/initializers/json.rb
    module JSON
      module_function
    
      def parse(source, opts = {})
        Parser.new(source, **opts).parse
      end
    end
  9. joemsak commented on Feb 23, 2021

    @joemsak

    @airblade For me, your solution was no dice :(

  10. andregit1 commented on Mar 18, 2021

    @andregit1

    Using Rails, this seems to get rid of the warnings:

    # config/initializers/json.rb
    module JSON
      module_function
    
      def parse(source, opts = {})
        Parser.new(source, **opts).parse
      end
    end

    you're solutions really saved my day !

  11. added a commit that references this issue on Jul 6, 2022
  12. gentaro-sakamoto commented on Apr 19, 2023

    @gentaro-sakamoto
  13. added a commit that references this issue on Feb 20, 2024
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