fix(scrapers): Move flatten_to_json method in ContractCrawler

DRYs up the code a bit