This page was design to test the parsing of hcard and its output to the newer JSON structure of micorformats 2. These tests are part of the micorformats 2 test suite.
Theses are backwards compatibility tests for the older version 1 microformats specification. Please do not use this as a reference for authoring microformats.
Frances Berriman
{
"items": [{
"type": ["h-card"],
"properties": {
"name": ["Frances Berriman"]
}
}]
}
{
"items": [{
"type": ["h-card"],
"properties": {
"name": ["Ben Ward"],
"url": ["http://benward.me/"]
}
}]
}
{
"items": [{
"type": ["h-card"],
"properties": {
"name": ["Rohit Khare"],
"photo": ["https://twimg0-a.akamaihd.net/profile_images/53307499/180px-Rohit-sq.jpg"],
"url": ["http://rohit.khare.org/"]
}
}]
}
{
"items": [{
"type": ["h-card"],
"properties": {
"honorific-prefix": ["Dr"],
"given-name": ["John"],
"additional-name": ["Peter"],
"family-name": ["Doe"],
"honorific-suffix": ["MSc","PHD"],
"name": ["Dr John P Doe"]
}
}]
}
John Doe
{
"items": [{
"type": ["h-card"],
"properties": {
"name": ["John Doe"],
"given-name": ["John"]
}
}]
}
{
"items": [{
"type": ["h-card"],
"properties": {
"name": ["John Doe"],
"email": [
"mailto:john@example.com",
"mailto:john@example.com",
"mailto:john@example.com?subject=parser-test",
"john@example.com"
]
}
}]
}
Note: The second example (value pattern) parses differently to a V1 parser
{
"items": [{
"type": ["h-card"],
"properties": {
"name": ["John Doe"],
"given-name": ["John"],
"sort-string": ["John"],
"bday": ["2000-01-01T00:00:00-0800"],
"role": ["Designer"],
"geo": [{
"value": "Brighton",
"type": ["h-geo"],
"properties": {
"name": ["30.267991;-97.739568"]
}
}],
"tz": ["-05:00"],
"uid": ["http://example.com/profiles/johndoe"],
"class": ["Public"],
"rev": ["2008-01-01T13:45:00"]
}
}]
}
Nicknames:
About:
John Doe is one of those names you always have issues with.
It can be a real problem booking a hotel room with the name John Doe.
Companies:
Tags: design, development and web
Phone numbers:
Emails:
John Doe uses PigeonMail 2.1 or Outlook 2007 for email.
Addresses:
In emergency contact: Jane Doe or Dave Doe.
Key: hd02$Gfu*d%dh87KTa2=23934532479
{
"items": [{
"type": ["h-card"],
"properties": {
"name": ["John Doe"],
"given-name": ["John"],
"family-name": ["Doe"],
"sound": ["http://www.madgex.com/johndoe.mpeg"],
"photo": ["http://example.com/images/photo.gif"],
"nickname": ["Man with no name","Lost boy"],
"note": [
"John Doe is one of those names you always have issues with.",
"It can be a real problem booking a hotel room with the name John Doe."
],
"url": ["http://www.madgex.com/", "http://www.webfeetmedia.com/"],
"org": ["Madgex","Web Feet Media Ltd"],
"title": ["Creative Director", "Owner"],
"category": ["design", "development", "web"],
"tel": ["+1 415 555 100", "+1 415 555 200", "+1 415 555 300"],
"email": ["mailto:john.doe@madgex.com", "mailto:john.doe@webfeetmedia.com"],
"mailer": ["PigeonMail 2.1","Outlook 2007"],
"adr": [{
"value": "Work: North Street, Brighton, United Kingdom",
"type": ["h-adr"],
"properties": {
"street-address": ["North Street"],
"locality": ["Brighton"],
"country-name": ["United Kingdom"]
}
},{
"value": "Home: West Street, Brighton, United Kingdom",
"type": ["h-adr"],
"properties": {
"street-address": ["West Street"],
"locality": ["Brighton"],
"country-name": ["United Kingdom"]
}
}],
"label": ["Work: North Street, Brighton, United Kingdom", "Home: West Street, Brighton, United Kingdom"],
"agent": ["Jane Doe",
{
"value": "Dave Doe",
"type": ["h-card"],
"properties": {
"name": ["Dave Doe"]
}
}],
"key": ["hd02$Gfu*d%dh87KTa2=23934532479"]
}
}]
}
The orginal test also had contributions from: