Skip to content

Error parsing Lottie JSON with precomposition #4

Description

@sebasjham

bodymovin-rs is unable to parse any animations with precompositions.

Tested using several animations from https://googlefonts.github.io/noto-emoji-animation/. One animation with a precomp looks like this: (using https://lottiefiles.github.io/lottie-docs/playground/json_editor/):

image

Error:

Unable to parse lottie JSON: ParseFailed(Error("data did not match any variant of untagged enum Asset", line: 1, column: 80831))

I believe it is referring to this data structure not able to be deserialized

#[derive(Debug, Deserialize)]
#[serde(untagged)]
pub enum Asset {
    Image(Image),
    PreComp(PreComp),
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions