Difference between revisions of "jf2"

From Microformats Wiki
Jump to navigation Jump to search
(Undo revision 65369 by Benthatmustbeme (Talk) nevermind, this is actually a bug in webmention.io, misunderstanding there.)
(→‎Specification: Update the URLs)
Line 21: Line 21:
== Specification ==
== Specification ==
* [https://github.com/dissolve/jf2 github.com/dissolve/jf2] - Primary development
* [https://jf2.spec.indieweb.org/ JF2 Post Serialization Format]
** [https://github.com/indieweb/jf2 On GitHub]
== Implementations ==
== Implementations ==

Latest revision as of 17:21, 25 June 2018

This article is a stub. You can help the microformats.org wiki by expanding it.

jf2 is a working name for a simplified more minimal JSON representation of microformats2.

Basic Example

  "type": "entry",
  "author": {
     "type": "card",
     "name": "Tantek Çelik",
     "url": "http:\/\/tantek.com\/",
     "photo": "http:\/\/tantek.com\/photo.jpg"
  "published": "2015-10-21T12:34-0700",
  "category": ["simple", "example"],
  "content": "Example of a simple note"




Open source parsers:

Consuming Code

Service that converts jf2 into readable HTML:

Name Candidates

As 'jf2' is only a working name let's collect alternatives:

Backronym: JSON For Data Interchange
Minimal JSON for mf2

Prior Work

Prior Simplifications

Output from:


This service outputs a list of webmentions received for a post. It recognizes when a post is a reply, like, repost, invitation, RSVP, and mention. Example JSON output:

  "source": "http://tantek.com/2013/112/t2/milestone-show-indieweb-comments-h-entry-pingback",
  "verified": true,
  "verified_date": "2013-04-25T17:09:33-07:00",
  "id": 900,
  "data": {
    "author": {
      "name": "Tantek Çelik",
      "url": "http://tantek.com/",
      "photo": "http://tantek.com/logo.jpg"
    "name": "Another milestone: @eschnou automatically shows #indieweb comments with h-entry sent via pingback http://eschnou.com/entry/testing-indieweb-federation-with-waterpigscouk-aaronpareckicom-and--62-24908.html",
    "content": "Another milestone: <a class=\"auto-link h-x-username\" href=\"https:\/\/twitter.com\/eschnou\">@eschnou<\/a> automatically shows #indieweb comments with h-entry sent via pingback <a class=\"auto-link\" href=\"http:\/\/eschnou.com\/entry\/testing-indieweb-federation-with-waterpigscouk-aaronpareckicom-and--62-24908.html\">http:\/\/eschnou.com\/entry\/testing-indieweb-federation-with-waterpigscouk-aaronpareckicom-and--62-24908.html<\/a>",
    "published": "2013-04-22T15:03:00-07:00",
    "published_ts": 1366668180,
    "url": "http://tantek.com/2013/112/t2/milestone-show-indieweb-comments-h-entry-pingback"


This site outputs in multiple formats, based on receiving webmentions, parsing them for microformats and consolidating into a single feed. Live examples for kevinmarks.com:

<div class="h-entry">
  <a href="http://waterpigs.co.uk/" class="p-author h-card">
    <img src="http://waterpigs.co.uk/photo.jpg" alt="">
    Barnaby Walters
    <div class="p-summary p-name">@kevinmarks awesome demos as always! Thanks for live posting! #indiewebcampsf</div>
    <time class="dt-published" datetime="2014-04-01T14:25:14.000Z" pubdate="">
      <a class="u-url u-uid" href="http://waterpigs.co.uk/notes/4VMERE/">2 years ago</a>
     mentioning <a href="http://kevinmarks.com/">http://kevinmarks.com/</a>
"type": ["h-entry"], 
"properties": {
    "uid": ["http://waterpigs.co.uk/notes/4VMERE/"], 
    "author": [
        {"type": ["h-card"], 
            "properties": {
                "url": ["http://waterpigs.co.uk/"], 
                "photo": ["http://waterpigs.co.uk/photo.jpg"], 
                "name": [""]
            "value": "Barnaby Walters"
    "url": ["http://waterpigs.co.uk/notes/4VMERE/"], 
    "summary": ["@kevinmarks awesome demos as always! Thanks for live posting! #indiewebcampsf"], 
    "published": ["2014-04-01T14:25:14Z"], 
    "name": [ "@kevinmarks awesome demos as always! Thanks for live posting! #indiewebcampsf"]
  "summary":"@kevinmarks awesome demos as always! Thanks for live posting! #indiewebcampsf",
  "author": {
    "name":"Barnaby Walters",
  "interactions": ["http://www.kevinmarks.com/indiewebsfdemowrapup.html"],

php-comments library

This library takes HTML and converts it to a simple PHP data structure. Example post:

  $result = array(
    'type' => 'reply',
    'author' => array(
      'name' => 'Aaron Parecki',
      'photo' => 'http://aaronparecki.com/images/aaronpk.png',
      'url' => 'http://aaronparecki.com/'
    'published' => '2014-02-16T18:48:17-0800',
    'name' => 'Example Note',
    'text' => 'this text is displayed as the comment',
    'url' => 'http://aaronparecki.com/post/1'

See Also