Encode basic nested struct
Encode a struct with multiple nested structs
Encode deeply nested structs and nil structs