Skip to content

IPAddr#to_json remove prefix address with CIDR #503

@taketo1113

Description

@taketo1113

IPAddr#to_json removed the prefix address with IPAddr/CIDR value.
It unable to deserialize IPAddr/CIDR value.

Expected behavior

require 'date'
require 'json'

IPAddr.new('172.16.0.0/24').to_json #=> "\"172.16.0.0/24\""

Actual behavior

require 'ipaddr'
require 'json'

IPAddr.new('172.16.0.0/24').to_json #=> "\"172.16.0.0\""

Related URL

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