CM6's equivalence to mode options

CM5’s language mode can be an object like {name: "javascript", json: true}) but I cannot seem to find the documentation on how to do this in CM6. How can I accept options for a language mode (like options for defineMode) and how can I specify such an option when using a language mode? I apologize if I have missed something obvious from the documentation.

Most language packages expose a function that you call to get the language extension. That tends to take options. See for example lang-javascript.