In the public cedar-policy API, the the Policy type stores a "lossless" version of the policy to support printing either the JSON or Cedar format, depending on which was provided during the original construction.
The SchemaFragment type also has a "lossless" field, but this field is restricted to the JSON format. So it's not really "lossless" since it could end up losing information like comments.
Describe alternatives you've considered
No response
Additional context
No response
Is this something that you'd be interested in working on?
[ ] 👋 I may be able to implement this internal improvement
Describe the improvement you'd like to request
In the public
cedar-policy
API, the thePolicy
type stores a "lossless" version of the policy to support printing either the JSON or Cedar format, depending on which was provided during the original construction.The
SchemaFragment
type also has a "lossless" field, but this field is restricted to the JSON format. So it's not really "lossless" since it could end up losing information like comments.Describe alternatives you've considered
No response
Additional context
No response
Is this something that you'd be interested in working on?