Convert python prettyprinted strings to formatted JSON