-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert a JSON object to an Entities type #1066
Comments
Thank you for your interest in Cedar. We have a JSON format for entities, whose documentation can be found here. Once you specify entities in this format, you should be able to call Note that you may need to translate the JSON objects into Cedar's entity JSON format. We're exploring a solution (issue, rfc) that allows you to annotate the Rust type so that objects of a type can be automatically translated to |
Could there be a possibility of making the proposed solution also have inclusion for dynamic generation of Entities for crate consumers who only get to know the schema and object they are parsing at runtime? @shaobo-he-aws |
@muse254 Is it possible for you to depend on |
(note that |
Is it ok for me to start work on this under an experimental feature? |
That would be great, thank you! |
Category
User level API features/changes
Describe the feature you'd like to request
I have tried to look into the apis provided and can't find a way to convert a JSON dynamically to an Entity.
Say I have the JSON object
I would like to convert this to an Entities type with a function of maybe this signature
Expected entities representation (might be erroneous)
It's not possible to write an own implementation since
entityType
is private to the crate consumer once parsed to the Schema type and also we wouldn't want to have different implementations in the wild.Describe alternatives you've considered
I have tried to look into the apis provided for the
Schema
,Entities
and can't find a way to convert a JSON dynamically to an Entities type.Also, I haven't found any docs that describe this scenario.
Additional context
No response
Is this something that you'd be interested in working on?
The text was updated successfully, but these errors were encountered: