View Single Post
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 09-03-2017 , 05:42   Re: REST in Pawn - Communicate with JSON REST APIs
Reply With Quote #27

Quote:
Originally Posted by rio_ View Post
It shoudn't be up to the API you're communicating with to insert a null value for every possible key it could return.
I agree, it shouldn't. You should know which fields are returned based on the API's documentation. And APIs should be versioned so that changes don't break existing calls.

Quote:
Originally Posted by asherkin View Post
errors should always be avoidable and thus always caused by programmer error (either due to misuse or missing checks).
I'm not sure what's considered "programmer error" in this case. If you pass an invalid index to an ADT array it throws an error, but if you pass an invalid key to an ADT trie it returns false. So the former is programmer error, but the latter is not?
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.

Last edited by DJ Tsunami; 09-04-2017 at 10:59.
DJ Tsunami is offline