jf2
This article is a stub. You can help the IndieWeb wiki by expanding it.
jf2 is a working prototype of a simpler JSON serialization of microformats2.
Contents |
Example
{
"type":"entry",
"author":{
"type":"card",
"name":"Kevin Marks",
"photo":"http://known.kevinmarks.com/file/9255656669173b7867ab839ee6556f9e",
"url":"http://known.kevinmarks.com/profile/kevinmarks"
},
"url":"http://known.kevinmarks.com/2015/i-was-just-listening-to-programmesp02xy80y-about-how-we-reconstruct",
"published":"2015-07-30T00:32:47+00:00",
"name":"I was just listening to http://www.bbc.co.uk/programmes/p02xy80y about how we reconstruct memories continuously, and they can be changed by other people gaslighting us. Once silos learn to do this your written records will be even more precious.",
"content":{
"content-type":"text/html",
"value":" \n <p>I was just listening to <a href=\"http://www.bbc.co.uk/programmes/p02xy80y\" rel=\"nofollow\">http://www.bbc.co.uk/programmes/p02xy80y</a> about how we reconstruct memories continuously, and they can be changed by other people gaslighting us. Once silos learn to do this your written records will be even more precious.</p>\n "
},
"in-reply-to":"http://rhiaro.co.uk/2015/07/digital-memories",
"wm-property":"in-reply-to"
}
This example of jf2 contains an additional "wm-property" value that indicates the property that contains the primary relation of the webmention. In the example above, this is the "in-reply-to" property, but may also be the "like-of" or "repost-of" property.
Implementations
webmention.io
webmention.io can return a list of mentions of a URL in jf2 format. For example, https://webmention.io/api/mentions.jf2?target=http://rhiaro.co.uk/2015/07/digital-memories
socialstreams
Ben Roberts has set up a stream service at http://stream.thatmustbe.us that can convert MF2 to JF2 and back again. Code can be found on GitHub
Post Kinds for WordPress
David Shanske began converting his parsing code within the Post Kinds plugin to returnn jf2 and will likely be reimplementing additional code within same to use a mix of jf2 and mf2 as a way of ensuring better consistency and cross-compatibility. This is a work in progress.
more implementations
- See: http://microformats.org/wiki/jf2#Implementations for more open source parsers, jf2 converters, consuming code, etc.
















