Skip to content

Support .jsonc extension for all JSON files#1159

Merged
Dekkonot merged 18 commits intorojo-rbx:masterfrom
Dekkonot:john-jsonc-schmidt
Nov 19, 2025
Merged

Support .jsonc extension for all JSON files#1159
Dekkonot merged 18 commits intorojo-rbx:masterfrom
Dekkonot:john-jsonc-schmidt

Conversation

@Dekkonot
Copy link
Copy Markdown
Member

In #1144, we swapped our parser over to JSONC for all JSON projects. However, we did not support .jsonc as an extension for any of Rojo's files. This causes problems with linters and other niceties.

This PR fixes that! It adds support for:

  • .meta.jsonc
  • .project.jsonc
  • .model.jsonc
  • .jsonc

This turned out to be more complicated than anticipated because a lot of the support for default.project.json and .meta.json files were hardcoded.

To that end:

  • ServeSession no longer hardcodes default.project.json and instead uses a function built into Project
  • Several of the built-in project functions now support both default.project.json and default.project.jsonc
  • Metadata support has been refactored so that the metadata itself handles loading it rather than individual middleware calling from_slice and applying it, so that .meta.jsonc support could be done in one place

@Dekkonot Dekkonot added the scope: cli Relevant to the Rojo CLI label Nov 12, 2025
Copy link
Copy Markdown
Member

@kennethloeffler kennethloeffler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I quite like the new helpers for meta files!

@Dekkonot Dekkonot merged commit ea70d89 into rojo-rbx:master Nov 19, 2025
8 checks passed
@Dekkonot Dekkonot deleted the john-jsonc-schmidt branch November 19, 2025 02:47
@ryanlua
Copy link
Copy Markdown

ryanlua commented Mar 10, 2026

Looks like .model.jsonc isn't supported? I've been looking at this PR and see the code for .model.jsonc, but for some reason it doesn't want to sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: cli Relevant to the Rojo CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants