-
Notifications
You must be signed in to change notification settings - Fork 152
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
serialize the id field as a string #329
Comments
I'm not opposed to the change. It isn't going to be as simple as what you propose though. We have lookup tables that will have to be updated to handle both I think the way we might do this is to define an internal struct that represents the |
I guess I have been lucky, adding the toString() just worked for my use case, I didn't have to look what was happening further down in the library. |
I'm looking into this now. No promises yet. |
It looks like we can technically do it. I'm working on minimizing impact to public API. Then we'll have to evaluate risk and which milestone it might go in. |
I tested the new code on my project, and it worked beautifully! The requestId prefix was nice and easy to setup. Thanks @AArnott! |
Would the vs-streamjsonrpc maintainers consider adding an option/setting to serialize the id field as a string?
Here is the reasoning behind this request:
I am connecting to a terminal via jsonrpc. The terminal follows the JSON/RPC specifications, but defines the following additional constraint:
Right now the library serializes the id generated by the invoke* methods as integers. It was easy enough to fork the streamjsonrpc library to convert that id to a string. And that was enough to fullfil the terminal additional constraint.
Would the vs-streamjsonrpc maintainers consider adding an option/setting to serialize the id field as a string? Optionally, providing the user an option to use a define an id_prefix would be a nice addition.
The text was updated successfully, but these errors were encountered: