serialize/deserialize array of object or nested array