-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
handler: add an option to disallow array-based parameters (#114)
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
- Loading branch information
1 parent
241de22
commit a3d02fa
Showing
3 changed files
with
57 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters