ome / ome/ngff

Code examples should be JSONC rather than JSON

Open
#341 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation
Dominant language
Python
Stars
171
Forks
75
Avg merge
2d 3h
Merged PRs (30d)
20

Description

The examples contain JavaScript comments in them. JSON does now allow for comments. JSONC does allow for comments.

Notice how the comment here is highlighted in red.

{
  "zarr_format": 3,
  "node_type": "group",
  "attributes": {
    "ome": {
      "version": "0.5",
      "multiscales": [
        {
          "name": "example",
          "axes": [
            { "name": "t", "type": "time", "unit": "millisecond" },
            { "name": "c", "type": "channel" },
            { "name": "z", "type": "space", "unit": "micrometer" },
            { "name": "y", "type": "space", "unit": "micrometer" },
            { "name": "x", "type": "space", "unit": "micrometer" }
          ],
          "datasets": [
            {
              "path": "0",
              "coordinateTransformations": [
                {
                  // the voxel size for the first scale level (0.5 micrometer)
                  "type": "scale",
                  "scale": [1.0, 1.0, 0.5, 0.5, 0.5]
                }
              ]
            }
          ]
        }
     ]
    }
  }
}

If we code this as JSONC, the Github syntax highlighter is more forgiving.

{
  "zarr_format": 3,
  "node_type": "group",
  "attributes": {
    "ome": {
      "version": "0.5",
      "multiscales": [
        {
          "name": "example",
          "axes": [
            { "name": "t", "type": "time", "unit": "millisecond" },
            { "name": "c", "type": "channel" },
            { "name": "z", "type": "space", "unit": "micrometer" },
            { "name": "y", "type": "space", "unit": "micrometer" },
            { "name": "x", "type": "space", "unit": "micrometer" }
          ],
          "datasets": [
            {
              "path": "0",
              "coordinateTransformations": [
                {
                  // the voxel size for the first scale level (0.5 micrometer)
                  "type": "scale",
                  "scale": [1.0, 1.0, 0.5, 0.5, 0.5]
                }
              ]
            }
          ]
        }
     ]
    }
  }
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named; search the repository's documentation examples for fenced blocks labeled json that contain comments. Change the relevant fences to jsonc, then inspect the rendered examples on GitHub to confirm that comments are highlighted correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.