267
edits
No edit summary |
No edit summary |
||
Line 22: | Line 22: | ||
To perform the encoding, the following command is executed. Where the '''--encode''' flag indicates that encoding is to be performed. The '''-i''' flag indicates the input file, where the metadata must be raw without encoding. On the other hand, the '''-o''' flag indicates the output file, which contains the encoded bytes in a binary file. The '''--verbose''' flag shows the KLV bytes encoded on the terminal. | To perform the encoding, the following command is executed. Where the '''--encode''' flag indicates that encoding is to be performed. The '''-i''' flag indicates the input file, where the metadata must be raw without encoding. On the other hand, the '''-o''' flag indicates the output file, which contains the encoded bytes in a binary file. The '''--verbose''' flag shows the KLV bytes encoded on the terminal. | ||
The input JSON file is as follows: | |||
<syntaxhighlight lang=json> | |||
{ | |||
"key": "060E2B34020B01010E01030101000000", | |||
"items": [ | |||
{ | |||
"tag": "2", | |||
"value": "Oct. 24, 2008. 00:13:29.913" | |||
}, | |||
{ | |||
"tag": "3", | |||
"value": "MISSION01" | |||
}, | |||
{ | |||
"tag": "4", | |||
"value": "AF-101" | |||
}, | |||
{ | |||
"tag": "5", | |||
"value": "159.97436" | |||
}, | |||
{ | |||
"tag": "15", | |||
"value": "14190.7195" | |||
} | |||
] | |||
} | |||
</syntaxhighlight> | |||
<syntaxhighlight lang=C> | <syntaxhighlight lang=C> |
edits