module JSON::Ext
This module holds all the modules/classes that implement JSON’s functionality as C extensions.
This module holds all the modules/classes that implement JSON’s functionality as C extensions.
Public Class Methods
# File vendor/bundle/ruby/4.0.0/gems/json-3.1.0/lib/json/ext.rb, line 80 def on_duplicate_key(hash, as_json) set = {} hash.each_key do |key| key = coerce_key(key, as_json) if set[key] raise GeneratorError.new("detected duplicate key #{key.inspect}", key) else set[key] = true end end end