You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there! First of all, thanks for this library -- it's been fantastic to use.
I'm trying to emit some well-formed SARIF in zizmor and I'm running into some weirdness with how ResultLevel and ResultKind are serialized. More precisely, they seem to always be serialized as null (i.e. serde_json::value::Value::Null), regardless of their actual value.
The expected behavior is that this serializes to the JSON string "fail", but instead it serializes as null:
assertion `left == right` failed left: "null" right: "\"fail\""note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I took a quick look at the code, and it doesn't look wrong, but I'm not super familiar with strum (which seems to be controlling the serialization equivalents for each enum variant).
Let me know if there's any other information I can provide! I'll also keep debugging this on my end.
The text was updated successfully, but these errors were encountered:
I think I've root-caused this: these enums are defined with #[serde(untagged)], which is known to cause "bare" variants to serialize to null per serde-rs/serde#1560.
Instead of using untagged, these enums should be using #[serde(rename_all = "camelCase")]. I'll send a PR to make this change.
Hi there! First of all, thanks for this library -- it's been fantastic to use.
I'm trying to emit some well-formed SARIF in zizmor and I'm running into some weirdness with how
ResultLevel
andResultKind
are serialized. More precisely, they seem to always be serialized asnull
(i.e.serde_json::value::Value::Null
), regardless of their actual value.Here's a minimal failing reproducer:
The expected behavior is that this serializes to the JSON string
"fail"
, but instead it serializes asnull
:I took a quick look at the code, and it doesn't look wrong, but I'm not super familiar with
strum
(which seems to be controlling the serialization equivalents for each enum variant).Let me know if there's any other information I can provide! I'll also keep debugging this on my end.
The text was updated successfully, but these errors were encountered: