added a function to clean deploy writing for orchestrator
added test case for JSON encoding/decoding