Data is now casted from raw data to hexstring.
Initial patch, move 'type' to the top of the JSON string.