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

JSON::Tiny::Subclassable - subclass of JSON::Tiny which in practice is a fork

Authors

       David J. Oswald.

       Toby Inkster <tobyink@cpan.org>.

Bugs

       Please report any bugs to <http://rt.cpan.org/Dist/Display.html?Queue=JSON-MultiValueOrdered>.

Description

       Although technically this is a subclass of JSON::Tiny, in practice it's a fork because it overrides every
       method, and never calls the supermethods. In fact, even though this is a subclass of JSON::Tiny, you
       don't need to have the latter installed to use this module.

       The main difference between this module and its parent is that all the internal calls to private
       functions have been replaces with calls to private methods. This makes it easy to override particular
       parts of the JSON parsing/generation algorithm.

       The other tiny added feature is to support pretty indented output.

       This module was written to make developing JSON::MultiValueOrdered simpler, but it may be of some use for
       other purposes as well.

       JSON::Tiny::Subclassable is a subclass of JSON::Tiny, which is itself a fork of Mojo::JSON. Except where
       noted, the methods listed below behave identically to the methods of the same names in the superclass.

   Constructor
       "new(%attributes)"

   Attributes
       "pretty"
           If set to true, indents generated JSON in a pretty fashion.

       "error"

   Methods
       "decode($bytes)"
       "encode($ref)"
       "false"
       "true"
       "DOES($role)"
           As per UNIVERSAL::"DOES". Returns true for Mojo::DOM.

   Functions
       "j(\@array)" / "j(\%hash)" / "j($bytes)"
           Encode or decode JSON as applicable.

           This  function  may  be exported, but is not exported by default. You may request to import it with a
           different name:

              use JSON::Tiny::Subclassable j => { -as => 'quick_json' };

Disclaimer Of Warranties

       THIS  PACKAGE  IS  PROVIDED  "AS  IS"  AND  WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
       LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

perl v5.36.0                                       2022-11-20                      JSON::Tiny::Subclassable(3pm)

Name

       JSON::Tiny::Subclassable - subclass of JSON::Tiny which in practice is a fork

See Also

       JSON::Tiny, Mojo::JSON.

See Also