jf2

(Difference between revisions)

Jump to: navigation, search
(Obligatory Name Bikeshedding: positive reframe: Name Candidates, make it into a deflist accordingly)
(Prior Simplifications: webmention example)
Line 26: Line 26:
Output from:
Output from:
* webmention.io
* webmention.io
-
* webmention.herokuapp.com
+
(need specific examples from this)
-
 
+
=== webmention.herokuapp.com ===
-
(need specific examples from those two)
+
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:
 +
*[https://webmention.herokuapp.com/api/mentions?site=kevinmarks.com&format=html HTML mf2 markup]
 +
<pre>
 +
<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
 +
  </a>
 +
    <div class="p-summary p-name">@kevinmarks awesome demos as always! Thanks for live posting! #indiewebcampsf</div>
 +
  <footer>
 +
    <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>
 +
    </time>
 +
    mentioning <a href="http://kevinmarks.com/">http://kevinmarks.com/</a>
 +
  </footer>
 +
</div>
 +
</pre>
 +
*[http://www.unmung.com/mf2?url=https%3A%2F%2Fwebmention.herokuapp.com%2Fapi%2Fmentions%3Fsite%3Dkevinmarks.com%26format%3Dhtml&html=&pretty=on parsed JSON form of the HTML]
 +
<pre>
 +
{
 +
"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"]
 +
    }
 +
}
 +
</pre>
 +
*[https://webmention.herokuapp.com/api/mentions?site=kevinmarks.com&format=json simplified JSON]
 +
<pre>
 +
{"url":"http://waterpigs.co.uk/notes/4VMERE/",
 +
"name":null,
 +
"published":1396362314000,
 +
"summary":"@kevinmarks awesome demos as always! Thanks for live posting! #indiewebcampsf",
 +
"author":
 +
  {"name":"Barnaby Walters",
 +
  "photo":"http://waterpigs.co.uk/photo.jpg",
 +
  "url":"http://waterpigs.co.uk/"},
 +
"interactions": ["http://www.kevinmarks.com/indiewebsfdemowrapup.html"],
 +
"targets":["http://kevinmarks.com/"],
 +
"type":"reply",
 +
"interactionTarget":false},
 +
</pre>
== Name Candidates ==
== Name Candidates ==

Revision as of 20:17, 21 October 2015

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.

Contents

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"
}

Prior Work

Prior Simplifications

Output from:

(need specific examples from this)

webmention.herokuapp.com

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
  </a>
    <div class="p-summary p-name">@kevinmarks awesome demos as always! Thanks for live posting! #indiewebcampsf</div>
  <footer>
    <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>
    </time>
     mentioning <a href="http://kevinmarks.com/">http://kevinmarks.com/</a>
  </footer>
</div>
{
"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"]
    }
}
{"url":"http://waterpigs.co.uk/notes/4VMERE/",
"name":null,
"published":1396362314000,
"summary":"@kevinmarks awesome demos as always! Thanks for live posting! #indiewebcampsf",
"author":
  {"name":"Barnaby Walters",
   "photo":"http://waterpigs.co.uk/photo.jpg",
   "url":"http://waterpigs.co.uk/"},
"interactions": ["http://www.kevinmarks.com/indiewebsfdemowrapup.html"],
"targets":["http://kevinmarks.com/"],
"type":"reply",
"interactionTarget":false},

Name Candidates

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

JDFI
Backronym: JSON For Data Interchange
jf2
Minimal JSON for mf2

See Also

jf2 was last modified: Wednesday, December 31st, 1969

Views