cue vet with bytes type
#1155
Replies: 2 comments
-
|
@joelanford welcome to the CUE project! This looks like a bug, or more specifically a feature we haven't yet implemented totally in Please can you raise a feature request issue for this? |
Beta Was this translation helpful? Give feedback.
-
|
Hello, I've also run into this issue with CUE import "encoding/base64"
#base64Bytes: input={
string
#valid: base64.Decode(null, input)
}
b: #base64Bytes & "aGVsbG8sIHdvcmxkIQo="
// c: #base64Bytes & "$$$" // uncomment to see errorIdeally I would like to be able to use the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm hoping to use
cue vetto vet a JSON struct that contains a base64 encoded string, so I'd like my cue schema to contain abytesfield. Howevercue vetinterprets my JSON struct as astring(technically, it is) and complains that it is not abytes(even though it was exported from abytesfield). Is there any way to vet base64 encoded strings as bytes?Given the follow files:
schema.cue
bytes.cue
I expect to be able to export JSON and then vet it, but
vetfails.Beta Was this translation helpful? Give feedback.
All reactions