JSONデータをWeb上で変換出来るサービスを探していたところ、「Mr. Data Converter」と言うサービスを見つけました。
ここでは、簡単な使い方と結果を記載したいと思います。
Mr. Data Converterとは
タブ・CSV形式で区切られた表データをJSON・HTML・XML・SQLなどの様々なフォーマットに変換してくれる無料のWebサービスです。使い方
サンプル
サンプルデータとして以下のデータを使い実際の結果を記載します。column1 | column2 | column3 | column4 |
---|---|---|---|
a | 1 | 2013/1/1 | 15:01:25 |
b | 2 | 2013/1/2 | 16:01:25 |
c | 3 | 2013/1/3 | 17:01:25 |
d | 4 | 2013/1/4 | 18:01:25 |
e | 5 | 2013/1/5 | 19:01:25 |
f | 6 | 2013/1/6 | 20:01:25 |
g | 7 | 2013/1/7 | 21:01:25 |
h | 8 | 2013/1/8 | 22:01:25 |
- Actionscript
[{column1:"a",column2:1,column3:"2013/1/1",column4:"15:01:25"}, {column1:"b",column2:2,column3:"2013/1/2",column4:"16:01:25"}, {column1:"c",column2:3,column3:"2013/1/3",column4:"17:01:25"}, {column1:"d",column2:4,column3:"2013/1/4",column4:"18:01:25"}, {column1:"e",column2:5,column3:"2013/1/5",column4:"19:01:25"}, {column1:"f",column2:6,column3:"2013/1/6",column4:"20:01:25"}, {column1:"g",column2:7,column3:"2013/1/7",column4:"21:01:25"}, {column1:"h",column2:8,column3:"2013/1/8",column4:"22:01:25"}];
- ASP/VBScript
Dim myArray(3,7) myArray(0,0) = "a" myArray(1,0) = 1 myArray(2,0) = "2013/1/1" myArray(3,0) = "15:01:25" myArray(0,1) = "b" myArray(1,1) = 2 myArray(2,1) = "2013/1/2" myArray(3,1) = "16:01:25" myArray(0,2) = "c" myArray(1,2) = 3 myArray(2,2) = "2013/1/3" myArray(3,2) = "17:01:25" myArray(0,3) = "d" myArray(1,3) = 4 myArray(2,3) = "2013/1/4" myArray(3,3) = "18:01:25" myArray(0,4) = "e" myArray(1,4) = 5 myArray(2,4) = "2013/1/5" myArray(3,4) = "19:01:25" myArray(0,5) = "f" myArray(1,5) = 6 myArray(2,5) = "2013/1/6" myArray(3,5) = "20:01:25" myArray(0,6) = "g" myArray(1,6) = 7 myArray(2,6) = "2013/1/7" myArray(3,6) = "21:01:25" myArray(0,7) = "h" myArray(1,7) = 8 myArray(2,7) = "2013/1/8" myArray(3,7) = "22:01:25"
- HTML
<table>
<thead>
<tr>
<th class="column1-cell">column1</th>
<th class="column2-cell">column2</th>
<th class="column3-cell">column3</th>
<th class="column4-cell">column4</th>
</tr>
</thead>
<tbody>
<tr class="firstRow">
<td class="column1-cell">a</td>
<td class="column2-cell">1</td>
<td class="column3-cell">2013/1/1</td>
<td class="column4-cell">15:01:25</td>
</tr>
<tr>
<td class="column1-cell">b</td>
<td class="column2-cell">2</td>
<td class="column3-cell">2013/1/2</td>
<td class="column4-cell">16:01:25</td>
</tr>
<tr>
<td class="column1-cell">c</td>
<td class="column2-cell">3</td>
<td class="column3-cell">2013/1/3</td>
<td class="column4-cell">17:01:25</td>
</tr>
<tr>
<td class="column1-cell">d</td>
<td class="column2-cell">4</td>
<td class="column3-cell">2013/1/4</td>
<td class="column4-cell">18:01:25</td>
</tr>
<tr>
<td class="column1-cell">e</td>
<td class="column2-cell">5</td>
<td class="column3-cell">2013/1/5</td>
<td class="column4-cell">19:01:25</td>
</tr>
<tr>
<td class="column1-cell">f</td>
<td class="column2-cell">6</td>
<td class="column3-cell">2013/1/6</td>
<td class="column4-cell">20:01:25</td>
</tr>
<tr>
<td class="column1-cell">g</td>
<td class="column2-cell">7</td>
<td class="column3-cell">2013/1/7</td>
<td class="column4-cell">21:01:25</td>
</tr>
<tr class="lastRow">
<td class="column1-cell">h</td>
<td class="column2-cell">8</td>
<td class="column3-cell">2013/1/8</td>
<td class="column4-cell">22:01:25</td>
</tr>
</tbody>
</table>- JSON-Properites
[{"column1":"a","column2":1,"column3":"2013/1/1","column4":"15:01:25"}, {"column1":"b","column2":2,"column3":"2013/1/2","column4":"16:01:25"}, {"column1":"c","column2":3,"column3":"2013/1/3","column4":"17:01:25"}, {"column1":"d","column2":4,"column3":"2013/1/4","column4":"18:01:25"}, {"column1":"e","column2":5,"column3":"2013/1/5","column4":"19:01:25"}, {"column1":"f","column2":6,"column3":"2013/1/6","column4":"20:01:25"}, {"column1":"g","column2":7,"column3":"2013/1/7","column4":"21:01:25"}, {"column1":"h","column2":8,"column3":"2013/1/8","column4":"22:01:25"}]
- MySQL
CREATE TABLE MrDataConverter ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, column1 VARCHAR(255), column2 INT, column3 VARCHAR(255), column4 VARCHAR(255) ); INSERT INTO MrDataConverter (column1,column2,column3,column4) VALUES ('a',1,'2013/1/1','15:01:25'), ('b',2,'2013/1/2','16:01:25'), ('c',3,'2013/1/3','17:01:25'), ('d',4,'2013/1/4','18:01:25'), ('e',5,'2013/1/5','19:01:25'), ('f',6,'2013/1/6','20:01:25'), ('g',7,'2013/1/7','21:01:25'), ('h',8,'2013/1/8','22:01:25');
0 コメント:
コメントを投稿