JSON::Hyper::Link(3pm)

JSON::Hyper::Link3pm

Represents a link found in a json document

Overview

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"

Releases

3 releases since Debian 11 (Bullseye); the text changed 1 time.

  1. 11
  2. 12–13

Bugs

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

Author

Toby Inkster <[email protected]>.

From libjson-hyper-perl 0.011-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.