cedar-policy / cedar

Implementation of the Cedar Policy Language
https://www.cedarpolicy.com
Apache License 2.0
892 stars 80 forks source link

Lossless schema fragments aren't lossless #1118

Open khieta opened 3 months ago

khieta commented 3 months ago

Describe the improvement you'd like to request

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?