-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/cue: vet: literal-only mode #130
Comments
Original reply by @mpvl in cuelang/cue#130 (comment) This is consistent with having a Regarding the |
Original reply by @rogpeppe in cuelang/cue#130 (comment)
That's a bit different. The
So if you wanted to write a some code that reads the subset of cue accepted by It could even have its own name - how about "Q (CUE) Strict Object Notation" or QSON for short? |
Original reply by @mpvl in cuelang/cue#130 (comment) @rogpeppe Cute how the S is repurposed as strict. Fair enough. Should not be hard to implement. If a literal flag is set, one would walk over the ASTs of the parsed files (using Another possibility is CUEL, but I agree it is helpful to look similar to JSON to express its familiarity. Instead of Each output type could define the allowed modes. So for OpenAPI, there is only
|
Original reply by @mpvl in cuelang/cue#130 (comment) For |
Original reply by @rogpeppe in cuelang/cue#130 (comment)
This was my initial take on that whitelisting, FWIW: https://play.golang.org/p/571l3JrXsaS |
Originally opened by @rogpeppe in cuelang/cue#130
Cue makes for a potentially nice representation format even just as a literal representation of the data, without any of the expressive power of identifiers, functions, definitions, etc.
As suggested by @crawshaw here, it might be good to have a literal-only vet mode (
--literal
?).Such a subset of cue would be more amenable to parsing by other languages that don't have the full cue machinery, while still providing a very readable syntax for config files and the like.
This could also be paired with a
cue
export type to render the output in Cue rather than JSON.The text was updated successfully, but these errors were encountered: