Skip to main content

parse_annotation

Function parse_annotation 

Source
pub fn parse_annotation(json: &str) -> Result<Annotation, ParseAnnotationError>
Expand description

Parse an annotation from JSON, detecting the schema version and migrating to the canonical (latest) type.

This is the single deserialization chokepoint. All code that reads annotations from git notes should call this instead of using serde_json::from_str directly.