Skip to content
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

json/yaml/xml writer add redundant "Document" property at top level #234

Closed
nicoweidner opened this issue Sep 27, 2022 · 3 comments
Closed
Labels
writer Issues concerning the writing layer

Comments

@nicoweidner
Copy link
Collaborator

The writer for json/yaml/xml writes documents like the following, wrapping all content in a redundant Document property at top level:

{
    "Document": {
        "spdxVersion": "SPDX-2.1",
        "documentNamespace": "https://spdx.org/spdxdocs/spdx-example-444504E0-4F89-41D3-9A0C-0305E82C3301",
        <...>

Apart from being redundant, this is incompatible with e.g. the java spdx library, and it is also incompatible with the json spec.

Note: I feel I have seen this issue before, but I couldn't find it now.

@meretp
Copy link
Collaborator

meretp commented Oct 14, 2022

relates to #184

@nicoweidner nicoweidner added the writer Issues concerning the writing layer label Oct 20, 2022
@nicoweidner
Copy link
Collaborator Author

Comment: In the case of xml, there needs to be a root element, see https://www.w3schools.com/xml/xml_syntax.asp. But for json and yaml, this is not required.

@meretp
Copy link
Collaborator

meretp commented Nov 7, 2022

fixed with #254

@meretp meretp closed this as completed Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
writer Issues concerning the writing layer
Projects
None yet
Development

No branches or pull requests

2 participants