forked from cbor/cbor.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtools.html
59 lines (56 loc) · 3.82 KB
/
tools.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
layout: default
title: Tools
---
<div class='jumbotron'>
<h2>Tools</h2>
<p class='lead'>
Tools are becoming available for implementing systems with CBOR.
</p>
</div>
<hr>
<div class='row-fluid'>
<div class='span4'>
<h2>
<a href='http://cbor.me'>cbor.me</a>
</h2>
<p>Get to know CBOR and check your data in both binary form and JSON-derived diagnostic notation on this simple interactive website.</p>
<p>
<a class='btn' href='http://cbor.me'>View details »</a>
</p>
<h2>CBOR diagnostic utilities</h2>
<p>Convert between CBOR and a few other formats, including diagnostic notation.
Pretty-print binary CBOR to see what's inside.
Installation: <code>gem install cbor-diag</code></p>
<p>
<a class='btn' href='https://github.com/cabo/cbor-diag'>View details »</a>
</p>
</div>
<div class='span4'>
<h2>CDDL</h2>
<p>Write a specification in CDDL for what the overall structure of your CBOR data should be.
<strong>Generate</strong> example instances from that specification.
<strong>Validate</strong> instances against the specification.
Specifications are as simple as:</p>
<pre class="highlight ruby"><code><span class="n">reputation</span><span class="o">-</span><span class="n">object</span> <span class="o">=</span> <span class="p">{</span>
 <span class="ss">application: </span><span class="n">tstr</span>
 <span class="ss">reputons: </span><span class="p">[</span><span class="o">*</span> <span class="n">reputon</span><span class="p">]</span>
<span class="p">}</span>

<span class="n">reputon</span> <span class="o">=</span> <span class="p">{</span>
 <span class="ss">rater: </span><span class="n">tstr</span>
 <span class="ss">assertion: </span><span class="n">tstr</span>
 <span class="ss">rated: </span><span class="n">tstr</span>
 <span class="ss">rating: </span><span class="n">float16</span>
 <span class="p">?</span> <span class="ss">confidence: </span><span class="n">float16</span>
 <span class="p">?</span> <span class="n">normal</span><span class="o">-</span><span class="ss">rating: </span><span class="n">float16</span>
 <span class="p">?</span> <span class="n">sample</span><span class="o">-</span><span class="ss">size: </span><span class="n">uint</span>
 <span class="p">?</span> <span class="ss">generated: </span><span class="n">uint</span>
 <span class="p">?</span> <span class="ss">expires: </span><span class="n">uint</span>
 <span class="o">*</span> <span class="ss">tstr: </span><span class="n">any</span>
<span class="p">}</span>
</code></pre>
<p>(Example based on <a href="https://tools.ietf.org/html/rfc7071">RFC 7071</a>.)</p>
<p>Installation: <code>gem install cddl</code></p>
<p>(<a href="https://tools.ietf.org/html/rfc8610">CDDL Specification: RFC 8610</a>.)</p>
</div>
<div class='span4'>
<h2>Test vectors</h2>
<p>
Test vectors with valid CBOR data and the decoded equivalents are being collected in the CBOR github repository.
</p>
<p>
<a class='btn' href='https://github.com/cbor/test-vectors/'>View details »</a>
</p>
<h2>Tutorials</h2>
<p>
Tutorials are being created for CBOR. Here's one (in French). Yes, that's about the amount of text you need to become familiar with CBOR...
</p>
<p>
<a class='btn' href='http://www.bortzmeyer.org/7049.html'>View details »</a>
</p>
</div>
</div>