Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support encoding/decoding of vararrays of any type #323

Open
leighmcculloch opened this issue Nov 18, 2023 · 0 comments · May be fixed by #366
Open

Support encoding/decoding of vararrays of any type #323

leighmcculloch opened this issue Nov 18, 2023 · 0 comments · May be fixed by #366
Assignees

Comments

@leighmcculloch
Copy link
Member

It should be possible to encode/decode vararrays of any type, such as doing the equivalent as:

use stellar_xdr::curr::{DepthLimitedRead, DiagnosticEvent, ReadXdr, VecM};

fn main() {
    let events: VecM<DiagnosticEvent> =
        VecM::read_xdr_base64_to_end(&mut DepthLimitedRead::new(std::io::stdin(), 500)).unwrap();

    serde_json::to_writer_pretty(std::io::stdout(), &events).unwrap();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
@leighmcculloch and others