-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathindex.html
95 lines (92 loc) · 4.92 KB
/
index.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!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">
<meta name="msvalidate.01" content="9649D23AD4FDC221EAFD417DD073A99D" />
<link rel="manifest" href="/site.webmanifest">
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-TQQPCPSCN4"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-TQQPCPSCN4');
</script>
<script id="help-ukraine-win" async="true" src="https://helpukrainewinwidget.org/cdn/widget.js" data-type="one" data-position="top-right"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/styles/default.min.css">
</head>
<body>
<header>
<div class="intro">
<div class="title">
<h1>JSON-to-Proto</h1>
<h2>Convert JSON to Protobuf</h2>
<iframe src="https://ghbtns.com/github-btn.html?user=json-to-proto&repo=json-to-proto.github.io&type=star&count=true&size=large" class="github-stars" frameborder="0" scrolling="0" width="170" height="30" title="GitHub"></iframe>
</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><label><input type="checkbox" id="google.protobuf.Timestamp" checked>google.protobuf.Timestamp</label><label><input type="checkbox" id="merge-similar-objects">merge similar objects</label><label><input type="checkbox" id="lower-snake-case-field-names" checked>lower snake case field names</label> <span class="copy" id="copy-to-clipboard">Copy to clipboard</span></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>
<div class="info">
<div class="github-links">
<iframe src="https://ghbtns.com/github-btn.html?user=json-to-proto&repo=json-to-proto.github.io&type=star&count=true&size=large" frameborder="0" scrolling="0" width="170" height="30" title="GitHub"></iframe>
<a href="https://github.com/json-to-proto/json-to-proto.github.io" target="_blank">View on GitHub</a>
</div>
<div class="suport-buttons">
<a href="https://savelife.in.ua/en/" target="_blank">
<img src="./static/images/come-back-alive.png" alt="come back alive">
<span>Support</span>
<img src="./static/images/arrow.svg" alt="arrow">
</a>
<a href="https://bank.gov.ua/en/about/support-the-armed-forces/" target="_blank">
<img src="./static/images/national-bank-of-ukraine.png" alt="national bank of ukraine">
<span>Support</span>
<img src="./static/images/arrow.svg" alt="arrow">
</a>
<a href="https://war.ukraine.ua/" target="_blank">
<span>war.ukraine.ua</span>
<img src="./static/images/arrow.svg" alt="arrow">
</a>
</div>
</div>
<p>
© 2023 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>
</p>
</footer>
<script src="static/js/app.js"></script>
<script src="static/js/infowarship.js"></script>
</body>
</html>