I currently have the following JSON string:
'{"ECommerce ":{" Shopify ":," Magento ":," WooCommerce ":," Squarespace ":},"Tools ":{" Grunt ":," Gulp ":," Vagrant ":},"Containers ":{" LXC ":," Docker ":," Rocket ":},"Digital ":{" SEO ":," Email Marketing ":," Inbound Marketing ":," Crowdfunding ":," Content Distribution ":," Display Advertising ":," Ad Planning and Buying ":," Article Writing ":," SEM ":," Customer Relationship Management ":," Viral Marketing ":," Market Research ":," Social Media ":," Affiliate Marketing ":," Lead Generation ":},"Performance ":{" LoadStorm ":," httperf ":," JMeter ":," LoadUI ":," Blazemeter ":," LoadImpact ":," Nouvola ":," LoadRunner ":," Soasta CloudTest ":},
which somehow has semi-colons, quotes and an extra curly bracket mixed inside {}. I want to get rid of these so I can convert this to a Python dict, and my question is, is there a way to use regex to get rid of the extraneous characters (so the ": and { characters) found within these brackets {} (so as to leave the first semi-colon after what would be the first key "ECommerce").
I've bolded the characters that I believe would throw a JSONDecodeError:
'{"ECommerce ":{" Shopify ":," Magento ":," WooCommerce ":," Squarespace ":}
If that isn't possible, what other methods could I use to deal with this?
Thank you!
" Shopify ":,expects a value assigned as the colon suggests, which a value doesn't exist. You will get an error there. I'd do what @Barmar suggested which is addressing why it's giving bad JSON in the first place.