Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Empty arrays are not displayed #37

Closed
PostIt59 opened this issue May 9, 2022 · 3 comments
Closed

Empty arrays are not displayed #37

PostIt59 opened this issue May 9, 2022 · 3 comments

Comments

@PostIt59
Copy link

PostIt59 commented May 9, 2022

Hi @AykutSarac ,

I've juste discovered your tool which is amazing, it will be helpful for documentation.

However, when an array is empty its not displayed in the graph. You'll be able to visualize this bug with the following data (addresse array is not displayed) :

{
  "status": "active",
  "customerInformations": {
    "firstName": "John",
    "lastName": "DOE",
    "customerNumber": "123456789"
  },
  "addresses": [],
  "_metadata": {}
}

Is it a missing feature or it's a choice to ignore empty arrays ?

Thanks

@AykutSarac
Copy link
Owner

Hello, empty arrays are intentionally hidden from the graph (empty objects will be hidden in future too). Do you think this should be reverted?

@PostIt59
Copy link
Author

Hello @AykutSarac ,

In my opinion, since users want to add your graphs in documentation, it will be greater to display those empty arrays. So yes, for me, it should be reverted ;)

@nguyenab
Copy link

I think making this a toggle would be helpful. Displaying empty arrays or strings can be helpful to visualize the entire JSON structure.

Repository owner locked and limited conversation to collaborators Jun 9, 2022
@AykutSarac AykutSarac converted this issue into discussion #53 Jun 9, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants