Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

IPAddr#to_json

(?::JSON::State? state) -> ::String
to_json(*a)

Returns a json string containing the IP address representation.

See also #to_i #to_range #succ #to_s also in 4.1 · 4.0