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

How to (de)serialize ExecutableDocument? #1138

Closed
rieval opened this issue Nov 9, 2022 · 2 comments
Closed

How to (de)serialize ExecutableDocument? #1138

rieval opened this issue Nov 9, 2022 · 2 comments
Labels
question Further information is requested

Comments

@rieval
Copy link

rieval commented Nov 9, 2022

related issue

I want to be able to (de)serialize ExecutableDocument using serde_json or bincode.

example:

// doc: ExecutableDocument

// serde_json
match serde_json::to_string(&doc) {
    // data: String
    Ok(data) => {
        println!("OK: {:?}", data);
    }
    Err(e) => println!("Err: {:?}", e),
}

// bincode
match bincode::serialize(&doc) {
    // data: Vec<u8>
    Ok(data) => {
        println!("OK: {:?}", data);
    }
    Err(e) => println!("Err: {:?}", e),
}

result:

Err: cannot serialize variable
@rieval rieval added the question Further information is requested label Nov 9, 2022
@sunli829
Copy link
Collaborator

Fixed in master branch 🙂

sunli829 added a commit that referenced this issue Nov 15, 2022
@rieval
Copy link
Author

rieval commented Nov 16, 2022

Fixed in master branch 🙂

Great works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants