Remove newlines from JSON string
(obj)
| 47 | return org_name |
| 48 | |
| 49 | def clean_json_string(obj): |
| 50 | """Remove newlines from JSON string""" |
| 51 | json_str = json.dumps(obj, ensure_ascii=False, separators=(',', ':')) |
| 52 | # Remove any newlines that might be in the content |
| 53 | json_str = json_str.replace('\n', ' ').replace('\r', ' ') |
| 54 | # Clean up multiple spaces |
| 55 | json_str = ' '.join(json_str.split()) |
| 56 | return json_str |
| 57 | |
| 58 | def transform_episode(item, podcast_info): |
| 59 | """Transform a single episode to match the expected format""" |
no outgoing calls
no test coverage detected