Re: [w3c/webcomponents] HTML, CSS, and JSON modules shouldn't solely rely on MIME type to change parsing behavior (#839)

I'm curious -- is all forward progress on non-JS modules going to cease until syntax is finalized?  

As far as JSON imports, I wonder if it is out of the question to support the reviver parameter?  If so, this might suggest a syntax (specific for JSON):

```JavaScript
import doc from "./foo.json" with no reviver;
```

```JavaScript
import doc from "./foo.json" with reviver (key, value) =>
  typeof value === 'number'
    ? value * 2 // return value * 2 for numbers
    : value     // return everything else unchanged
);
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/839#issuecomment-549053839

Received on Saturday, 2 November 2019 15:27:34 UTC