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 doesnt have an id or version to read from #18

Open
popcron opened this issue Aug 7, 2022 · 0 comments
Open

Json doesnt have an id or version to read from #18

popcron opened this issue Aug 7, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@popcron
Copy link

popcron commented Aug 7, 2022

the NugetPackageDrawer class is trying to reference id and version from a json that didnt have it:

.Concat(obj.items).SelectMany(x => x.items)
.Select(x => new(x.catalogEntry.id, x.catalogEntry.version, ...)

my first change was to make it work requried to add a @id field to the catalog page class and an upper field (for version), the items array was left unused and the select becomes:

.Concat(obj.items).
.Select(x => new(x.@id, x.upper, ...)

and here is the json that I would normally get for Microsoft.Net.Compilers.
however, this wont show all of the versions for open sesame because the json for those actually matches, so a better fix for me locally is to init the items variables for catalog root and page to a new blank array s o that linq could keep going.

public CatalogPage[] items = { };
public Package[] items = { };
@popcron popcron added the bug Something isn't working label Aug 7, 2022
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

No branches or pull requests

2 participants