-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 empty nodes #251
fix empty nodes #251
Conversation
It works so great, thanks so much for that I'll be following up and testing this! Would you be able to make improvements for this to work? #181 |
Yes I created it now, but to not bug all UI of graph I put it only in objects out of an array, I don't know if the PR #181 is better choose, but to you compare I printed the graph: Result of #181: Result of the first example in #242:
You want that I push this commit? |
Yes, please push the commit. II'll test it with more data and share my feedbacks with you. |
There's this issue, if there is a single object. The fields with string should be in a single node and rest should be connected to it. From this JSON it works very different that you will notice: {
"id": "AAL",
"identifiers": [
{
"identifier": "AAL",
"scheme": "SPDX"
},
{
"identifier": "License :: OSI Approved :: Attribution Assurance License",
"scheme": "Trove"
}
],
"links": [
{
"note": "OSI Page",
"url": "https://opensource.org/licenses/AAL"
}
],
"name": "Attribution Assurance License",
"other_names": [],
"superseded_by": null,
"keywords": [
"osi-approved",
"discouraged",
"redundant"
],
"text": [
{
"media_type": "text/html",
"title": "HTML",
"url": "https://opensource.org/licenses/AAL"
}
]
} I'm guessing it happens because nodes are created right after a line is read and not until whole object is did read? Thanks again for putting your effort into this, you will make a significant impact on this project :) |
Looks like when a parent node is collapsed and its parent is collapsed and expanded back, it's child disappears. Should be investigated later on after the parser is setup. This PR will make #161 possible ✨ |
About this issue, is to make it too to fields with string that have parents? Because your example only have nodes that not have a parent.
"sa": "sa", "si": "si" and "cg": "Cg" is to be the same node or "cg": "Cg" is to be separated of others in other node? |
Amazing! ✨ |
No, what I mean here is when going through inside of an object e.g. {
"str1": "string",
"array": ["hi", "ho"],
"str2": "string2"
} String values inside of an object should create a single object and rest should be seperated and connected same as how current jsoncrack.com works. |
You want that the childrens of an object without a key into an array repeat the same behavior expected? (because in this new commit it doesn't happen) |
Can you elaborate with example of data? I think with the latest commit all seems fine. |
Yes, the commit 76bcad4 kept separated the brothers node in a object from array. This example was obtained in: https://api.opensource.org/licenses/
commit 76bcad4: new commit e772153: |
Now with the last commit e772153 all seems fine. |
Thank you Victor! Finally, I believe it would be a better UX experience to not have a root node if there's an array of object at root level independent of each other like in the https://api.opensource.org/licenses/ So, same as the current version can we keep them seperated without connections? [
{
"id": "Zlib",
"identifiers": [
{
"identifier": "Zlib",
"scheme": "DEP5"
},
{
"identifier": "Zlib",
"scheme": "SPDX"
},
{
"identifier": "License :: OSI Approved :: zlib/libpng License",
"scheme": "Trove"
}
],
"links": [
{
"note": "OSI Page",
"url": "https://opensource.org/licenses/Zlib"
}
],
"name": "The zlib/libpng License (Zlib)",
"other_names": [],
"superseded_by": null,
"keywords": [
"osi-approved"
],
"text": [
{
"media_type": "text/html",
"title": "HTML",
"url": "https://opensource.org/licenses/Zlib"
}
]
},
{
"id": "jabberpl",
"identifiers": [
{
"identifier": "License :: OSI Approved :: Jabber Open Source License",
"scheme": "Trove"
}
],
"links": [
{
"note": "OSI Page",
"url": "https://opensource.org/licenses/jabberpl"
}
],
"name": "Jabber Open Source License",
"other_names": [],
"superseded_by": null,
"keywords": [
"discouraged",
"retired",
"osi-approved"
],
"text": [
{
"media_type": "text/html",
"title": "HTML",
"url": "https://opensource.org/licenses/jabberpl"
}
]
}
] |
@AykutSarac Yes. I will commit now. |
Awesome work @victorbrambati! Parser seems ready to be merged, now I'm investigate the collapse/expand issue and I'll commit whenever I find a solution. You may want to take a look if you have an idea. {
"ankara": {
"name": "name",
"username": "username",
"password": "password",
"servers": [
{
"ipaddress": "10.10.10.10",
"listenport": 4222,
"clusterport": 6112
}
]
}
} |
It happen when a parent connect a parent directly, before that did not happen. Probrably is a problem in algorithm of a collapsed nodes that it was not thought to work in these circumstances. |
@AykutSarac I found a solution: |
Awesome work @victorbrambati, I'm merging this now with the |
I created the PR #242 but the updates created a conflict with my old PR. This PR solve the same problem, I tested the problems from #242 and it work correctly. Thank you for the patience.