logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

MooseX::Types::JSON - JSON datatype for Moose

Author

       Author: Graham Ollis <plicease@cpan.org>

       Contributors:

       Steve Huff

Name

       MooseX::Types::JSON - JSON datatype for Moose

Synopsis

        package Foo;

        use Moose;
        use Moose::Util::TypeConstraints;
        use MooseX::Types::JSON qw( JSON relaxedJSON );

        has config  => ( is => 'rw', isa => JSON        );
        has options => ( is => 'rw', isa => relaxedJSON );

       String type constraints that match valid and relaxed JSON. For the meaning of 'relaxed' see JSON. All the
       heavy lifting in the background is also done by JSON.

       Coercions from Defined types are included.

       •   JSON

           A Str that is valid JSON.

       •   relaxedJSON

           A Str that is 'relaxed' JSON. For the meaning of 'relaxed' see JSON.

Version

       version 1.01

See Also