swapi: make JSON output of swapi valid
swapi: add a doctest case to check the case empty data was passed in results_to_json_str()
fix conflicts