def str_query_param(value: 'PrimitiveData') ->str:
    """
    Coerce a primitive data type into a string value for query params.

    Note that we prefer JSON-style 'true'/'false' for boolean values here.
    """
    if value is True:
        return 'true'
    elif value is False:
        return 'false'
    elif value is None:
        return ''
    return str(value)
