For an NLP project, I'm looking to preprocess text which sometimes contains unwanted content in curly braces that looks like JSON, for example:
Some useful content here {"contentId":"QI9GPST0AFB401","dimensions":{"large_desktop":[[120,60]]}} good stuff here {some other curly braces}
All I want to do is remove the text within curly braces, to be left with
Some useful content here good stuff here
The complexity seems to come from the fact that there's multiple sets of curly braces, which disqualifies solutions like this one, and that there's nested curly braces, which disqualifies regex-based solutions like this one.