Hello, Is there a way I can get the schema behind the JSON that Twitter api returns e.g.- If noOfTweets is Integer then i also get that datatype back somehow? something like .xsd information. #json #schema #rest-api #response #xsd
We do not publish a schema for the JSON objects, you’ll need to look at the developer documentation example formats to understand the fields that are returned.
Why do you not provide a JSON schema? It is human-readable but more importantly also machine-readable.
Your IDE may warn you of errors when you are trying to access a key that does not exist according to the schema. It also makes writing code easier since your IDE has a dropdown-autocomplete-menu of variables that might be available.
Also an experienced programmer has a much easier time reading a JSON schema than reading through the docs determining if a key is optional or not.
It also makes writing tests easier. I can see many advantages and no disadvantage in publishing the schemas for the JSON objects.