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::Hyper::Link - represents a link found in a JSON document

Author

       Toby Inkster <tobyink@cpan.org>.

Bugs

       Please report any bugs to <http://rt.cpan.org/>.

Description

       This is a tiny object representng a hyperlink found in a JSON document.  You totally have my permission
       to treat it as a hashref if you want.  Encapsulation, ensmapulation!

   Constructor
       Generally speaking you don't want to construct these. They're constructed by JSON::Hyper's "find_links"
       method and I can't think of any conceivable reason why you'd want to construct one yourself.
       Nevertheless...

       "new(\%attrs)"
       "new($uri)"
           Constructor takes a hashref of attributes, or a single URI as a string.

   Attributes
       These  attributes  are hash keys for the constructor, and also exist as methods that can be called on the
       object to retrieve the value.

       "href"
           The URL linked to.

       "rel"
           The relationship between the URL has with the document that linked to it.

       "targetSchema"
           A JSON schema (see JSON::Schema) that the URL linked to supposedly conforms to.

           A method "target_schema" is also available if you're alergic to camelCase, but "targetSchema" is  the
           only attribute recognised by the constructor.

       "method"
           The HTTP method recommended for interacting with the URL. If undef, then 'GET' is usually a good bet.

       "enctype"
           If POSTing data to this URL, the recommended Content-Type header.

       "schema"
       "properties"

Name

       JSON::Hyper::Link - represents a link found in a JSON document

See Also

       Related modules: JSON::Hyper.

See Also