This kind of nesting is generally supported and, if the kind of animal is not known upfront, this is what I'd usually also do. What does the error message say?

Thanks for the help! I found the issue was my mistake - for this testing, another Json field was returning as null, which was failing. There's a flag for ignoring null values when unpacking, right? How is that done (and where is it documented)?

I see something like Nullable!Json u in these forums, but I think that's deprecated now? I think I saw another flag such as @ignore... Something like

struct animal {
  string p;
  Nullable!Json animal;
  @ignore Json animal2;
}