-
Notifications
You must be signed in to change notification settings - Fork 46
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
Discussion: How to handle different deserialization scenarios #860
Comments
For 1. and 2. above, suggest creating an SpdxDocument in memory "on the fly" with all of the Element(s) represented as root elements. For 3., should we assume the single SpdxDocument represents the serialization information? Is there any validation we could do to confirm this? If we assume it represents the serialization information, then we can augment the serialized SpdxDocument with the information from the file itself to complete the in-memory representation. Scenario 4. is the most challenging. It's quite likely one of the SpdxDocuments represents the serialization itself - but which one? We would need some way of determining which one is the SpdxDocument - or we treat it the same as not having any SpdxDocument. |
I can tell you how the I really believe that this approach is the right way to go. Don't encumber users with the semantics of IOW, with the shacl2code python bindings (and the C++ bindings I'm working on), none of these 4 are a problem at all, since SPDXDocument is not special. |
@JPEWdev - I think your approach for the lower level language bindings is fine. The libraries I'm writing have to deal with the higher level semantics, hence the need to solve the issue. The I'm starting to form the opinion that we need to fix this in the serialization schema - either add an optional property at the root level, or require that only one |
Moving this to 3.1 (assuming we choose a non-breaking change approach) |
The serialization documentation has fairly detailed descriptions on how to serialize, but not as much a deserialization approaches and scenarios.
Specifically, it would be good to (decide and) document how the resultant model would be represented in the following scenarios:
How do we handle creating the in-memory SPDX documents in each of these scenarios?
The text was updated successfully, but these errors were encountered: