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

Add support for boost::json::value_from, boost::json::value_to #95

Open
pdimov opened this issue Oct 14, 2022 · 2 comments
Open

Add support for boost::json::value_from, boost::json::value_to #95

pdimov opened this issue Oct 14, 2022 · 2 comments

Comments

@pdimov
Copy link
Member

pdimov commented Oct 14, 2022

  • result<T, E>: { "value": t } or { "error": e };
  • error_code: { "category": "system", "value": 5, "message": "Access is denied" };
  • error_condition: same;
  • error_code wrapping std::error_code: "category": "std:system";
  • for value_to, when the category name is unrecognized (not one of "system", "generic", "std:system", "std:generic", "std:iostream"?, "std:future"?): deserialize to unknown_category, same value;
  • maybe use the unknown category instead of "interop", too, without modifying the value.
@pdimov
Copy link
Member Author

pdimov commented Jan 7, 2023

The JSON-RPC specification uses { "result": t } for the value case, instead of "value"; it also uses { "code": 5 } for the error code, instead of "value".

@pdimov
Copy link
Member Author

pdimov commented Jan 8, 2023

The category in the std::error_code case should probably also be just "system" or "generic", so as to match the eventual value_from for std::error_code provided by Boost.JSON.

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

No branches or pull requests

1 participant