oasis-xrd: Extensible Resource Descriptor

[ bsd3, library, web ] [ Propose Tags ]

Types and encodings for "XRD, a simple generic format for describing resources". Includes JRD encoding from RFC 6415.


[Skip to Readme]
Versions [faq] 1.0
Change log CHANGELOG.md
Dependencies aeson (>=1.2 && <2.0), base (>=4.10 && <5.0), bytestring (>=0.10 && <1.0), containers (==0.5.*), text (>=1.2 && <2.0), time (>=1.8 && <2.0), uri-bytestring (==0.3.*), xml-conduit (>=1.8 && <2.0), xml-conduit-writer (==0.1.*) [details]
License BSD-3-Clause
Copyright 2018 Alexander Bondarenko
Author Alexander Bondarenko
Maintainer aenor.realm@gmail.com
Revised Revision 1 made by AlexanderBondarenko at Sat Apr 7 21:00:44 UTC 2018
Category Web
Home page https://gitlab.com/dpwiz/oasis-xrd
Uploaded by AlexanderBondarenko at Sat Apr 7 20:50:32 UTC 2018
Distributions NixOS:1.0
Downloads 187 total (10 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2018-04-14 [all 1 reports]

Modules

[Index]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees


Readme for oasis-xrd-1.0

[back to package description]

oasis-xrd

Types and rendering of XRD and web-host metadata.

Part of the Fediverse suite of protocols.

XML

XML output of tests/example/Main.hs on example from Section B:

<XRD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
    <Expires>
        1970-01-01T00:00:00Z
    </Expires>
    <Subject>
        http://example.com/gpburdell
    </Subject>
    <Property type="http://spec.example.net/type/person" xsi:nil="True"/>
    <Link href="http://services.example.com/auth" rel="http://spec.example.net/auth/1.0"/>
    <Link
      href="http://photos.example.com/gpburdell.jpg"
      rel="http://spec.example.net/photo/1.0"
      type="image/jpeg">
        <Title xml:lang="en">
            User Photo
        </Title>
        <Title xml:lang="de">
            Benutzerfoto
        </Title>
        <Property type="http://spec.example.net/created/1.0">
            1970-01-01
        </Property>
    </Link>
</XRD>

JSON (JRD)

JSON output of tests/example-json/Main.hs on example from RFC 6415:

{
    "subject": "http://blog.example.com/article/id/314",
    "expires": "1970-01-01T00:00:00Z",
    "aliases": [
        "http://blog.example.com/cool_new_thing",
        "http://blog.example.com/steve/article/7"
    ],
    "links": [
        {
            "titles": {
                "default": "About the Author",
                "en-us": "Author Information"
            },
            "href": "http://blog.example.com/author/steve",
            "type": "text/html",
            "rel": "author",
            "properties": {
                "http://example.com/role": "editor"
            }
        },
        {
            "titles": {
                "default": "The other author"
            },
            "href": "http://example.com/author/john",
            "rel": "author"
        },
        {
            "template": "http://example.com/copyright?id={uri}",
            "rel": "author"
        }
    ],
    "properties": {
        "http://blgx.example.net/ns/ext": null,
        "http://blgx.example.net/ns/version": "1.3"
    }
}