Converts this StoryItem instance to a JSON format.
Map<String, dynamic> toJson() => {"url": url, "viewers": viewers, "type": type.name, "duration": duration};