It was about time, wasn't it? πŸ˜… πŸ‘‡

But now, with Firefox 138 all major browser engines support import attributes to import JSON from within your ECMAScript modules. πŸ‘‡

βœ… Chromium: 123+
βœ… Safari: 17.2+
βœ… Firefox: 138+ (released 2w ago)

PS. This syntax works in modern Node.js, too!

// Import Attributes
import data from "./resource.json" with { type: "json" };
0

If you have a fediverse account, you can quote this note from your own instance. Search https://front-end.social/users/stefan/statuses/114511458139113308 on your instance and quote it. (Note that quoting is not supported in Mastodon.)