forked from json-to-proto/json-to-proto.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
64 lines (61 loc) · 2.62 KB
/
Copy pathindex.html
File metadata and controls
64 lines (61 loc) · 2.62 KB
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
60
61
62
63
64
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>JSON-to-Proto: Convert JSON to Protobuf instantly</title>
<link rel="stylesheet" href="static/css/app.css">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-164331514-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-164331514-1');
</script>
</head>
<body>
<header>
<div class="intro">
<div class="title">
<h1>JSON-to-Proto</h1>
<h2>Convert JSON to Protobuf</h2>
</div>
<div>
<p>
This tool instantly converts JSON into a Protobuf. Paste a JSON structure on the left and the equivalent Protobuf will be generated to the right, which you can paste into your program. The script has to make some assumptions, so double-check the output!
</p>
<p>
For an example, try converting JSON from the <a href="javascript:void(0);" id="sample">GitHub API</a>.
</p>
<p>
<a href="https://github.com/json-to-proto/json-to-proto.github.io" target="_blank">View on GitHub</a>
• Inspired by <a href="https://mholt.github.io/json-to-go/" target="_blank">JSON-to-Go</a>
</p>
</div>
</div>
</header>
<table>
<tr>
<th style="width: 45%;">JSON</th>
<th style="width: 10%; font-size: 22px;">→</th>
<th style="width: 45%;">Protobuf <label><input type="checkbox" id="inline" checked>Inline definitions</label></th>
</tr>
</table>
<table>
<tr>
<td style="width: 50%;">
<div id="input" contenteditable></div>
</td>
<td style="width: 50%;">
<div id="output"></div>
</td>
</tr>
</table>
<footer>© 2020 Yaroslav Podorvanov <svg xmlns="http://www.w3.org/2000/svg" width="15" height="10"><rect width="15" height="10" fill="#005BBB"/><rect width="15" height="5" y="5" fill="#FFD500"/></svg></footer>
<script src="static/js/app.js"></script>
</body>
</html>