You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Rust generated code stores XDR strings as vectors of u8's because Rust's definition of a string is strictly UTF8, where-as the XDR definition is loose supporting any byte sequences.
However, for the serde JSON encoding of the XDR it would be ideal if the fields designated as strings could be rendered as Strings.
This raises the question: What should the serde serialization do if the vector of u8's contains non-UTF8 sequences? Should it:
Panic.
Convert lossy.
Alternatively: Is there a way in Rust we could render a string in the serde JSON output that is not UTF8 safe by reverting to displaying \xAB style characters. This would be preferable because it would preserve the encoding, while still allowing us to optimize for human friendly string rendering.
This issue is similar and in the same category of work as #118 and #119.
The text was updated successfully, but these errors were encountered:
The Rust generated code stores XDR strings as vectors of u8's because Rust's definition of a string is strictly UTF8, where-as the XDR definition is loose supporting any byte sequences.
However, for the serde JSON encoding of the XDR it would be ideal if the fields designated as strings could be rendered as Strings.
This raises the question: What should the serde serialization do if the vector of u8's contains non-UTF8 sequences? Should it:
Alternatively: Is there a way in Rust we could render a string in the serde JSON output that is not UTF8 safe by reverting to displaying
\xAB
style characters. This would be preferable because it would preserve the encoding, while still allowing us to optimize for human friendly string rendering.This issue is similar and in the same category of work as #118 and #119.
The text was updated successfully, but these errors were encountered: