user1032531 user1032531 - 11 days ago 5x
reST (reStructuredText) Question

How should REST API accept boolean values?

Resource 123 has a current configuration state and a default configuration state, and both of these configuration states can be represented by JSON.

A GET request to will return the current configuration state, and a GET request to will return the default configuration state.

How should an API interpret boolean values? For instance:


Whichever way you want it to, it's completely up to you as the architect/designer. true/false is the most syntactically correct version, make sure that one works and add the other options as sugar if you want.