We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I want to write binary file,and can read it back. Please give me an example. thanks
The text was updated successfully, but these errors were encountered:
Do you mean CBOR or MessagePack?
// read CBOR file std::ifstream input_file("input.cbor", std::ios::binary); std::vector<uint8_t> input_vector( (std::istreambuf_iterator<char>(input_file)), std::istreambuf_iterator<char>()); json j = json::from_cbor(input_vector); // write CBOR file std::ofstream output_file("output.cbor", std::ios::out | std::ios::binary); std::vector<uint8_t> output_vector; json::to_cbor(j, output_vector); file.write(output_vector.data(), output_vector.size());
Sorry, something went wrong.
Thank you very much! Your json library very very cool and very friendly to use!
No branches or pull requests
I want to write binary file,and can read it back.
Please give me an example.
thanks
The text was updated successfully, but these errors were encountered: