json datatype consistency?

  • 1
  • Question
  • Updated 5 years ago
Maybe it's just how I'm testing my code with the APIs, but can you clarify whether the datatypes of the date-structure are consistent across calls? It does not appear so to me...

For example,

In forecast10day, each "date" contains day, month, year, yday, and hour as integers. But it appears that min (minutes) is a string???

And then if you compare that to fields in history API-call, "date" contains year, mon, mday, hour, and min all as strings.

Wouldn't it be a great idea to make these fields consistent across the APIs? The naming of the fields changes too, which could be another point of improvement, but the datatypes being different makes it really hard to code a consistent app.

Thanks for any feedback/corrections/ideas.

-AJ
Photo of ajw

ajw

  • 6 Posts
  • 0 Reply Likes

Posted 5 years ago

  • 1
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 123 Reply Likes
"date consistency" is on our to-do list and we're aware of its inconsistencies, unfortunately.
Photo of ajw

ajw

  • 6 Posts
  • 0 Reply Likes
OK, thank you again for the quick reply.

Is there an email-list or notification place I should sign-up to be notified as APIs are added/changed/updated?
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 123 Reply Likes
We'll post in the forums when we create a V2 with cleaned up data/date and new features.