linera-protocol
linera-protocol copied to clipboard
Serialize `MessageId` as a string if `is_human_readable`. Revisit other `bcs_scalar!` types.
If one uses MessageId as a field in a struct returned from a GraphQL query, that field will be a string with the hexadecimal representation of the message ID's BCS serialization. Using serde_json to deserialize the struct will fail, because it will expect MessageId as a struct.
We should probably revisit all types where we are using bcs_scalar!, and change them so that the serde serialization implementation also uses a string if is_human_readable().