data-hex in publish stream

+2 votes
Hi ,

I am trying to figure out what is the data-hex in stream publish or any other function?

Can you please refer me to something which will be helpful, is that some data converted into hexa-decimal?

 

 

Thanks,

Mudassir Syed
asked Aug 2, 2017 by Syed

1 Answer

+2 votes

This is how the raw data is stored. sometimes its readable.. like what you put into the stream.

The hex you find at the top of a json call under a property named HEX is the raw hex of JSON. Copy your transaction hex and paste it into a hex to ascii decoder - something like http://www.rapidtables.com/convert/number/hex-to-ascii.htm

You wont need this usually as the raw hex is already the json you get back (with a few differences)

Your custom fields and data you add to transactions are also encoded to hex and you can do the same thing, converting it.

consider the following:

  "type": "stream",
            "name": "Item",
            "streamref": "20-265-54584",
            "publishers": ["1DpvKsVyF37NMGhwowenKKrRT8Hi92HZZT8t9J"],
            "key": "Property",
            "data": "7b22746f6b656e223a2250412d636465633264723230333261663134227d"

 

the data can be transformed back to what you put in.

{"token":"PA-cdec2dr2032af14"}

 

answered Aug 3, 2017 by MaSsv
edited Aug 3, 2017 by MaSsv
...