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

The JSON previewer in the OpenNeuro website doesn't handle 0, NULL, or FALSE #3231

Open
prioux opened this issue Nov 20, 2024 · 0 comments
Open
Labels

Comments

@prioux
Copy link

prioux commented Nov 20, 2024

What went wrong?

This is a bug report about the dataset browser included in the open neuro website. When browsing the list of files in a dataset, there are often JSON files in there. Alongside the filename will be a small "eye" icon that we can click to preview the JSON file in a pretty way.

If the JSON properties have values that are 'null' (not as a string, as the keyword), '0' (as an integer), '0.0' (as a float) or 'false' (as the JSON keyword), the pretty view at the top will not show the property, instead it will say "Property is empty" (and not even indicate the property name).

I'm including two screenshots: a section of JSON

openneuro_json

and the 'pretty' render of that section:

openneuro_pretty

Expected behavior

The pretty view should show the property name and the value in exactly the same type as in the JSON (null, 0, 0.0, "" etc).

How to reproduce

  1. Go the ANY openneuro dataset
  2. dig down through the files
  3. find a JSON file
  4. click the 'eye' icon and compare what you see and what was in the JSON file

Desktop

Any browser.

Phone

No response

Additional information

No response

@prioux prioux added the bug label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant