updates JSONController to return empty arrays instead of null objects