[http://creativecommons.org/licenses/by/3.0/]
This work is licensed under a CC
Attribution 3.0 Unported License [http://creativecommons.org/licenses/by/3.0/]
reality
sentences of the API conversation
common representation patterns
{
"Image": {
"Width": 800,
"Height": 600,
"Title": "View from 15th Floor",
"Thumbnail": {
"Url": "http://www.example.com/image/481989943",
"Height": 125,
"Width": 100
},
"Animated" : false,
"IDs": [116, 943, 234, 38793]
}
}<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE document SYSTEM "section.dtd"> <document> <section id="sgml" author="dret"> <title>Standard Generalized Markup Language (SGML)</title> <p>SGML is an ISO standard ...</p> <section id="sgml-syntax" author="bob"> <title>SGML Syntax</title> <p>SGML uses markup, which is ...</p> </section> </section> <section id="xml" author="bob"> <title>Extensible Markup Language (XML)</title> <p>XML is based on SGML (Section <ref name="sgml"/>) ...</p> <p type="example">XML can be used ...</p> <section id="xml-syntax" author="dret"> <title>XML Syntax</title> <p>Section <ref name="sgml-syntax"/> describes ...</p> </section> </section> </document>
profile links and/or representation mechanisms
on-the-wiremodels
<?xml version="1.0" encoding="UTF-8"?> <element> <subelement attribute="value">Content</subelement> <subelement a2="value2">More Content</subelement> <empty-element a3="v3"></empty-element> <empty-element a4="v4" a5="v5"/> </element>

XML documents can use a wide array of characters. They are defined by Unicode [http://www.unicode.org/], which in Version 5.0 defines more than 100'000 characters (#100'000 added in 2005).
<?xml version="1.0" encoding="UTF-8"?> <JAPANESE> <TITLE>専門家リスト </TITLE> <ITEM>アシム・アブドゥラー氏(コマースネット事務局長)</ITEM> <ITEM>アラン・A・メッコラー氏(メッコラーメディア会長兼CEO)</ITEM> <ITEM>アラン・サルディッチ氏(メトリコムディレクター)</ITEM> <ITEM>ウィスター・ウォルコット氏(パイロットネットワーク・サービシズ副社長)</ITEM> <ITEM>・エリック・リンゲワルド氏(ビー・インク副社長)</ITEM> <ITEM>ジェームス・L・バークスデール氏(ネットスケープ・コミュニケーションズ社長)</ITEM> </JAPANESE>
<?xml version="1.0" encoding="UTF-8"?> <文書 改訂日付="1999年3月1日"> <題>サンプル</題> <段落>これはサンプル文書です。</段落> <!-- コメント --> <段落>会社名</段落> <図面 図面実体名="サンプル" /> </文書>
<html>, <id9832798472>, <_>, <:>, <こんにちは><address><city>Berkeley</city><zip>94709</zip>…)
<givenname>Erik</givenname><givenname>Thomas</givenname>)
content
<section id="xml" author="bob"> <title>Extensible Markup Language (XML)</title> <p>XML is based on SGML (Section <ref name="sgml"/>) ...</p> <p type="example">XML can be used ...</p> <section id="xml-syntax" author="dret"> <title>XML Syntax</title> <p>Section <ref name="sgml-syntax"/> describes ...</p> </section> </section>
The term Mixed content in XML refers to elements which have text content mixed with elements [http://www.w3.org/TR/xml/#sec-mixed-content]. What these elements do depends on the elements
, but the important point is that they are on the same level as the text nodes of
the mixed content.
<p>The term <em>Mixed content</em> in XML refers to elements <a href="http://www.w3.org/TR/xml/#sec-mixed-content">which have text content mixed with elements</a>. What these elements do depends on the elements <img style="height : 1em" src="smiley.gif"/>, but the important point is that they are on the same level as the text nodes of the mixed content.</p>

on-the-wiremodels
data structure partof JavaScript
objects are a set of name/value pairs called membersarrays are a sequence of potentially heterogeneous values
numbers use regular decimal notation with an optional exponent
strings are quoted with escape for special characters and Unicode
booleans use the two values true and false{
"Image": {
"Width": 800,
"Height": 600,
"Title": "View from 15th Floor",
"Thumbnail": {
"Url": "http://www.example.com/image/481989943",
"Height": 125,
"Width": 100
},
"Animated" : false,
"IDs": [116, 943, 234, 38793]
}
}base64url [http://tools.ietf.org/html/rfc4648#section-5]spreadsheet data
application/problem+json is a JSON-based representation of the problem detail model
application/problem+xml is an XML-based representation of the problem detail model

dret.net/lectures/politecnico-2018 [http://dret.net/lectures/politecnico-2018]dret/lectures [http://github.com/dret/lectures/tree/master/politecnico-2018] on GitHub [http://github.com/]http://dret.net/netdret/ [http://dret.net/netdret/]@dret [http://twitter.com/dret]