forked from open-policy-agent/opa
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ast: Marshal non-string object keys when converting to interface{}
Previously, when OPA attempted to convert an ast.Object to interface{} it would error if the ast.Object contained any keys that were not ast.String values. This behaviour was implemented because JSON only supports object keys as strings. This commit changes the conversion implementation to simply JSON marshal non-string object keys when they are encountered. This way we avoid runtime errors which can be difficult to debug. Fixes open-policy-agent#516 Signed-off-by: Torin Sandall <torinsandall@gmail.com>
- Loading branch information
Showing
4 changed files
with
52 additions
and
11 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
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