Add toJSON() to container inheritable