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

Fix: unmarshal key values in Java, Go, and Conan metadata #2603

Merged
merged 5 commits into from
Feb 7, 2024

Conversation

willmurphyscode
Copy link
Contributor

Previously, there was no custom unmarshaling behavior for the new KeyValues struct, so old Syft JSON's that had map[string]string instead of KeyValues couldn't be decoded.

Signed-off-by: Will Murphy <will.murphy@anchore.com>
Signed-off-by: Will Murphy <will.murphy@anchore.com>
Signed-off-by: Will Murphy <will.murphy@anchore.com>
Signed-off-by: Will Murphy <will.murphy@anchore.com>
@willmurphyscode willmurphyscode merged commit ce67927 into main Feb 7, 2024
11 checks passed
@willmurphyscode willmurphyscode deleted the fix/unmarshal-key-values branch February 7, 2024 16:26
@wagoodman wagoodman added the bug Something isn't working label Feb 7, 2024
GijsCalis pushed a commit to GijsCalis/syft that referenced this pull request Feb 19, 2024
Previously, Syft represented several metadata fields as map[string]string,
however this representation erased ordering, so Syft now represents these values
as []KeyValue. Add custom unmarshaling so that JSON that was written by
older versions of Syft using the map[string]string representation can be parsed
into the new []KeyValue representation.

Signed-off-by: Will Murphy <will.murphy@anchore.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants