Skip to content

Documentation ambiguity for JsonProvider #1073

@saschanaz

Description

@saschanaz

On the paragraph Parsing Twitter stream:

After creating the Tweet type, we parse a single sample tweet and print some details about the tweet. As you can see, the tweet.User property has been inferred as optional (meaning that a tweet might not have an author?) so we unsafely get the value using the Value property. The RetweetCount and Text properties may be also missing, so we also access them unsafely.

No, all those fields are not optional. If you see the data it contains Tweets and some delete event objects of which structure is vastly different from the one of Tweet.

{"delete":{"status":{"id":3179185988182016,"id_str":"3179185988182016","user_id_str":"126735178","user_id":126735178}}}

This causes the type provider mark every field optional, which is not very useful...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions