End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Kernel#j
j(*objs)
ext/json/lib/json/common.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/ext/json/lib/json/common.rb, line 663
def j(*objs)
objs.each do |obj|
puts JSON::generate(obj, :allow_nan => true, :max_nesting => false)
end
nil
end
Outputs objs to STDOUT as JSON strings in the shortest form, that is in one line.