zed icon indicating copy to clipboard operation
zed copied to clipboard

Generic parse function

Open philrz opened this issue 3 years ago • 0 comments

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.

philrz avatar Oct 06 '22 00:10 philrz