-
-
Notifications
You must be signed in to change notification settings - Fork 114
Description
Hello @Stranger6667, I appreciate your work on JSONSchema.
In the current implementation of JSONSchema, the node member is marked as pub(crate), unfortunately limiting its accessibility. I understand that this is likely done for encapsulation and safety reasons, but for my use case, I need to traverse and potentially manipulate the internal structure of the JSONSchema to perform some custom processing.
Here is the relevant code snippet:
pub struct JSONSchema {
pub(crate) node: SchemaNode,
config: Arc<CompilationOptions>,
}I am wondering if there is a recommended approach or an existing method within the library that allows for traversal or access to the private node members of JSONSchema? If there is a way to achieve this without directly exposing the internals, that would be ideal for maintaining the integrity of the library's design.
Alternatively, if it's possible to provide a public API or method that facilitates the traversal of the JSONSchema tree structure, that would be incredibly helpful for my project.
My use case involves iterating over the private node members of JSONSchema to dynamically create forms that are reflective of the schema's structure. I understand that these members are currently private for encapsulation and safety reasons, but I am seeking a way to access them for form generation. I understand this might be an edge case, but I believe it could benefit others who may have similar requirements in the future. Any guidance or suggestions on this matter would be greatly appreciated.
Thank you in advance for your time and help.