+ 01. If the `Content-Type` header of `response` has a type of `text`
+ and subtype of `html`, let `document` be the result of
+ processing the body of `response` into a D·O·M tree as an
+ H·T·M·L document .
+ It is an error if this process fails.
+
+ 02. If the `Content-Type` header of `response` has a type of
+ `application` and a subtype which is `xml` or which ends in
+ `+xml`, let `document` be the result of processing the body
+ of `response` into a D·O·M tree as an X·M·L document .
+ It is an error if this process fails.
+
+ 03. Otherwise, let `document` be null.
+
+05. If `document` is not null :—
+
+ 01. If there is a `<link>` element in either the H·T·M·L namespace
+ or the Atom namespace in `document` with a `rel` of `meta`
+ and a `type` of `application/ld+json`, set `resource_url` to
+ the `href` of that `<link>` element and restart these steps
+ from step 1.
+ If multiple such elements exist, choose the first one.
+
+ 02. Otherwise, it is an error.
+
+06. If the body of `response` is not a Json document, it is an error.
+
+Assuming the U·R·L you were given was valid, you will end this
+ algorithm with a Json‐L·D response, and you can use the `@type`
+ attribute to determine the response type.
+`@type` will be either a string or an array.
+
+ + If the `@type` is or contains `Forum`, the resource is a collection
+ of topics.
+
+ + If the `@type` is or contains `Thread`, the resource is a
+ collection of statuses.
+
+ + If the `@type` is or contains `Microblog`, the resource describes
+ this site as a whole.
+ The `streams` property will contain a list of available `Forum`s
+ and `Thread`s, as objects with an `@id` and `@type`.
+
+The items in the collection (`Forum` or `Thread`) may be determined
+ through one of the following methods :—
+
+ + If the `@type` is or contains `CollectionPage` or
+ `OrderedCollectionPage`, then its `items` will contain resources.
+ This is a partial collection, and the `prev` and `next` properties
+ can be used to access further items from the parent collection
+ (indicated by `partOf`).
+ `first` and `current`, in this scenario, point “horizontally” to
+ the first and latest pages of items, not to subpages.
+
+ + If the `@type` is or contains `Collection` or `OrderedCollection`
+ and the resource has `first` and/or `current` properties, then
+ the `items` property will not be present.
+ `first` and `current` can be accessed to provide
+ `OrderedCollectionPage`s listing the items of the collection.
+
+ + Otherwise, the `items` property will contain every item in the
+ collection.