Use class as parameter instead of object in fromJson method