cedar-policy / cedar-java

Java bindings for the Cedar language
https://www.cedarpolicy.com
Apache License 2.0
42 stars 19 forks source link

Support conversion to Json for Policies #171

Closed mark-creamer-amazon closed 2 months ago

mark-creamer-amazon commented 3 months ago

Category

User level API changes

Describe the feature you'd like to request

We need to provide a method to convert human readable policy syntax to the json representation. When we build our Java Policy object, we don't currently have a method to retrieve the JSON string corresponding to the tied policySrc.

Describe alternatives you've considered

No response

Additional context

No response

Is this something that you'd be interested in working on?

khieta commented 3 months ago

Heads up that we'll be adding this functionality to the Cedar Json FFI once we get to cedar#854 (likely next week).

It's also possible to implemented this functionality directly in interface.rs, but probably better to reuse the Json FFI where possible.