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

[BUG]: object member and array of one object member have same visual results #140

Closed
levalup opened this issue Sep 5, 2022 · 4 comments · Fixed by #264
Closed

[BUG]: object member and array of one object member have same visual results #140

levalup opened this issue Sep 5, 2022 · 4 comments · Fixed by #264
Assignees
Labels
bug Something isn't working

Comments

@levalup
Copy link

levalup commented Sep 5, 2022

Issue description

Using JSON:

{
  "A": {
    "A": true
  },
  "B": [
    {
      "A": true
    }
  ]
}

at https://jsoncrack.com/editor

gives:

image

As A and B are different at all.

Media & Screenshots

No response

Operating system

  • OS: macOS Monterey 12.5.1
  • Browser: Safari 15.6.1 (17613.3.9.1.16)

Priority this issue should have

Low (slightly annoying)

@levalup levalup added the bug Something isn't working label Sep 5, 2022
@AykutSarac
Copy link
Owner

I'm open for suggestions.

@levalup levalup closed this as completed Sep 14, 2022
@levalup
Copy link
Author

levalup commented Sep 14, 2022

May add symbol [] and {} to tell which type it is. like:
188413040-fc33c890-67eb-4b99-926e-7d7a96a84c3e

@levalup levalup reopened this Sep 14, 2022
@jonasmateus
Copy link

jonasmateus commented Nov 7, 2022

I´ve been testing the code and I don´t know how to do that yet. Cause I have to check each key of json for check if it´s an array or object, doing this I put string square or curly brackets. The square element <TextNode/> receives a property called text representing the displayed content.

@victorbrambati
Copy link
Contributor

victorbrambati commented Nov 8, 2022

@jonasmateus Now with the new parser algorithm in PR #251 you can have the type of node, in addNodes() you can create a object in data called type.

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 a pull request may close this issue.

4 participants