Right now snapd returns json except when it doesn't. This is extremely inconvenient because we can't leverage serde_json for everything. At the moment, assertions just manually parse a couple fields we needed for the app center ratings backend and call it a day, but we need to find a way to actually handle the return values.
There are also a couple endpoints that return new-line separated lists of json (not to be confused with the actual json list aka []).
The assertion is annoying because it's almost valid yaml, except for the attached signature. We might be able to find a way to separate out the signature and then leverage serde-yaml.
Otherwise we may have to write a custom Deserializer implementation (luckily since we only receive, not send, a custom Serializer is not necessary).
Right now
snapdreturnsjsonexcept when it doesn't. This is extremely inconvenient because we can't leverageserde_jsonfor everything. At the moment, assertions just manually parse a couple fields we needed for the app center ratings backend and call it a day, but we need to find a way to actually handle the return values.There are also a couple endpoints that return new-line separated lists of
json(not to be confused with the actualjsonlist aka[]).The assertion is annoying because it's almost valid
yaml, except for the attached signature. We might be able to find a way to separate out the signature and then leverageserde-yaml.Otherwise we may have to write a custom
Deserializerimplementation (luckily since we only receive, not send, a customSerializeris not necessary).