-
Notifications
You must be signed in to change notification settings - Fork 1
7. Json hex
Nanocat edited this page Sep 14, 2017
·
2 revisions
Its data store protocol, which helps store data in blockchain without special symbols and with small size.
First 4 bytes from jsonhex its a version. In version 0.0.01 version is 0xf0f001f
. Next 4 bytes is signature of jsonhex Sign its first 4 bytes from double sha256 bytes of jsonhex. Next bytes - jsonhex object, that contain another jsonhex primitives. Below description of jsonhex primitives.
All jsonhex primitives have one structure:
1 byte type, var_str key, value
Byte order:
uint8 0xf4
var_str key
var_int count values
json_primitives[]
Byte order:
uint8 0xf4
var_str key
var_int count values
json_primitives[]
Byte order:
uint8 0xf0
var_str key
uint8 0
Byte order:
uint8 0xf2
var_str key
var_int value
Byte order:
uint8 0xf6
var_str key
var_str value
Byte order:
uint8 0xf5
var_str key
var_str value