-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for arbitrary C#
object
types as inputs (#60)
The `evaluate<T>` and `evaluateDefault<T>` methods now allow arbitrary C# objects as inputs to a policy. This makes the API much more ergonomic to use, at the expense of a bit of serdes overhead under-the-hood. We serialize the incoming object to JSON, and then attempt to convert it to a `Dictionary<string, object>`. This is reasonable in context, because other primitive JSON types should be matched by more specific methods, like the `string` or `double` methods, for instance. Signed-off-by: Philip Conrad <philip@chariot-chaser.net>
- Loading branch information
1 parent
db524da
commit a824381
Showing
2 changed files
with
222 additions
and
2 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