update comment
This commit is contained in:
@@ -451,9 +451,9 @@ function smartpack(
|
|||||||
# Process each payload in the list
|
# Process each payload in the list
|
||||||
payloads = msg_payload_v1[]
|
payloads = msg_payload_v1[]
|
||||||
for (dataname, payload_data, payload_type) in data
|
for (dataname, payload_data, payload_type) in data
|
||||||
@show dataname typeof(payload_data)
|
# @show dataname typeof(payload_data)
|
||||||
|
|
||||||
# Serialize data based on type
|
# Serialize data based on type. use bytes as medium for every datatype
|
||||||
payload_bytes = _serialize_data(payload_data, payload_type)
|
payload_bytes = _serialize_data(payload_data, payload_type)
|
||||||
|
|
||||||
payload_size = length(payload_bytes) # Calculate payload size in bytes
|
payload_size = length(payload_bytes) # Calculate payload size in bytes
|
||||||
@@ -811,7 +811,7 @@ function smartunpack(
|
|||||||
max_retries::Int = 5,
|
max_retries::Int = 5,
|
||||||
base_delay::Int = 100,
|
base_delay::Int = 100,
|
||||||
max_delay::Int = 5000
|
max_delay::Int = 5000
|
||||||
)::JSON.Object{String, Any}
|
)::JSON.Object{String, Any}
|
||||||
|
|
||||||
# Parse the JSON envelope
|
# Parse the JSON envelope
|
||||||
env_json_obj = JSON.parse(msg_json_str)
|
env_json_obj = JSON.parse(msg_json_str)
|
||||||
@@ -834,7 +834,7 @@ function smartunpack(
|
|||||||
# Extract base64 payload from the payload
|
# Extract base64 payload from the payload
|
||||||
payload_b64 = String(payload["data"])
|
payload_b64 = String(payload["data"])
|
||||||
|
|
||||||
# Decode Base64 payload
|
# Decode Base64 payload back into bytes (smartpack use bytes as medium for every datatype)
|
||||||
payload_bytes = Base64.base64decode(payload_b64) # Decode base64 payload to bytes
|
payload_bytes = Base64.base64decode(payload_b64) # Decode base64 payload to bytes
|
||||||
|
|
||||||
# Deserialize based on type
|
# Deserialize based on type
|
||||||
|
|||||||
Reference in New Issue
Block a user