zed
zed copied to clipboard
Generic parse function
For parsing strings into structured values (see #4129), the language could take a similar approach to what Zed does for auto-detecting file formats for input. That is, rather than having specific functions like parse_zson() (which also already handles JSON strings) and parse_uri(), there could be a single generic parsing function that auto-detects the various supported string formats that can currently be parsed, and perhaps include an optional "format" parameter if a need arises to specify explicitly an expected format when there might be ambiguity between supported formats.