The issue is likely due to extra whitespaces or formatting introduced by the indent=2 argument when serializing the JSON using json.dumps