-
Notifications
You must be signed in to change notification settings - Fork 10
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
handler: add an option to disallow array-based parameters #114
Conversation
64aaa2c
to
ac49d54
Compare
9c52ded
to
ada7b95
Compare
ada7b95
to
e8e088a
Compare
e8e088a
to
d8d9723
Compare
Any change of getting this merged soonish? I would like to be able to close stellar/stellar-rpc#13 |
Sure, I'm glad to merge it anytime. I was leaving it open to make sure you had a chance to test it before I put a release number on it. If you're content with the current status, I'll merge and tag it. |
Add a new AllowArray option to handler.FuncInfo controlling whether the decoder will allow array notation for struct arguments. The default is true, so that existing use is not affected. When true (the default), the decoder allows the arguments for a struct to be passed as a JSON array and maps the corresponding values to the struct fields in order of declaration. This is the existing behaviour. When false, the decoder reports an error for a struct-valued argument when the parameter value is an array. Updates #113
d8d9723
to
89f56f0
Compare
Maintenance: - go.mod: update module dependencies - .github: update setup-go to v5 - Use queue.Queue instead of mlink.Queue. Features: - handler: add an option to disallow array-based parameters (#114)
This is now tagged at and after release v1.2.0. |
Awesome. Thanks a lot! |
Add a new AllowArray option to handler.FuncInfo controlling whether the decoder
will allow array notation for struct arguments. The default is true, so that
existing use is not affected.
When true (the default), the decoder allows the arguments for a struct to be
passed as a JSON array and maps the corresponding values to the struct fields
in order of declaration. This is the existing behaviour.
When false, the decoder reports an error for a struct-valued argument when the
parameter value is an array.
Updates #113