REST API does not accept JSON boolean values in POST data.
The API uses lazr.config.as_boolean() to convert values in POST data from strings to bools. All of our REST API docs examples use our documentation helpers to post data as Python dictionaries with boolean values like True
and False
. These ultimately get converted to strings by requests.request()
, so our doctests all work.
The issue is if someone reading the docs creates code which posts a JSON object with JSON boolean values, we call as_boolean()
on the boolean value and that throws an Attribute Error. We should just accept the boolean value without trying to decode it.