jf2: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
(→‎Prior Simplifications: webmention example)
(→‎webmention.herokuapp.com: add space, source tags)
Line 30: Line 30:
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:
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]
*[https://webmention.herokuapp.com/api/mentions?site=kevinmarks.com&format=html HTML mf2 markup]
<pre>
<source lang=html4strict>
<div class="h-entry">
<div class="h-entry">
   <a href="http://waterpigs.co.uk/" class="p-author h-card">
   <a href="http://waterpigs.co.uk/" class="p-author h-card">
Line 44: Line 44:
   </footer>
   </footer>
</div>
</div>
</pre>
</source>
*[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]
*[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>
<source lang=javascript>
{
{
"type": ["h-entry"],  
"type": ["h-entry"],  
Line 66: Line 66:
     }
     }
}
}
</pre>
</source>
*[https://webmention.herokuapp.com/api/mentions?site=kevinmarks.com&format=json simplified JSON]
*[https://webmention.herokuapp.com/api/mentions?site=kevinmarks.com&format=json simplified JSON] (whitespace added)
<pre>
<source lang=javascript>
{"url":"http://waterpigs.co.uk/notes/4VMERE/",
{
"name":null,
  "url":"http://waterpigs.co.uk/notes/4VMERE/",
"published":1396362314000,
  "name":null,
"summary":"@kevinmarks awesome demos as always! Thanks for live posting! #indiewebcampsf",
  "published":1396362314000,
"author":
  "summary":"@kevinmarks awesome demos as always! Thanks for live posting! #indiewebcampsf",
  {"name":"Barnaby Walters",
  "author": {
  "photo":"http://waterpigs.co.uk/photo.jpg",
    "name":"Barnaby Walters",
  "url":"http://waterpigs.co.uk/"},
    "photo":"http://waterpigs.co.uk/photo.jpg",
"interactions": ["http://www.kevinmarks.com/indiewebsfdemowrapup.html"],
    "url":"http://waterpigs.co.uk/"
"targets":["http://kevinmarks.com/"],
  },
"type":"reply",
  "interactions": ["http://www.kevinmarks.com/indiewebsfdemowrapup.html"],
"interactionTarget":false},
  "targets":["http://kevinmarks.com/"],
</pre>
  "type":"reply",
  "interactionTarget":false
},
</source>


== Name Candidates ==
== Name Candidates ==

Revision as of 20:29, 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.

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:

  • webmention.io

(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