[Extractor] Add spec

Fix the iteration and handle json_decode fails