Available on crate feature
serde only.Expand description
JSON helpers shared by the forge wrappers, behind the serde feature — so the
three forge parsers share one null -> "" and parse-error convention.
Functions§
- from_
json - Deserialize a forge CLI’s
--jsonoutput intoT, mapping a parse failure toError::Parsetagged withprogram(the CLI’s binary name). - null_
to_ empty - Deserialize a
Stringa forge CLI may send as JSONnullfor an empty optional value:null-> empty string, same as an absent key.#[serde(default)]alone covers only an absent key; a presentnullwould fail the whole-object parse. Use as#[serde(deserialize_with = "vcs_cli_support::json::null_to_empty")].