Skip to main content

peek_version

Function peek_version 

Source
pub fn peek_version(json: &str) -> u32
Expand description

Read the top-level "version" field from a save JSON without deserializing the rest of the document. Returns 1 if the field is absent, non-numeric, or the JSON itself is malformed — pre-versioned saves (everything written by main before this branch) are V1 by definition.