:as_json now supports an array of models