Skip to content

Round trip testing for JSON policy format #204

@khieta

Description

@khieta

Category

DRT target(s)

Describe the feature you'd like to request

We currently don't have any DRT targets that test the JSON policy format. Such a target may have found the behavior described in cedar#596, which shows that it is not the case that all policies that can be parsed by Policy::from_str can be converted to json using Policy::to_json.

Proposal for a new target: generate ASTs and check that, if they can be re-parsed (which is not guaranteed because auto-generated ASTs may not satisfy properties expected by CSTs), then they can be converted to JSON.

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 feature request
  • ⚠️ This feature might incur a breaking change

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions