Serialize operation to json instead of yaml
It also resolves the missing PyYAML dependency issue. Since we plan to switch from prompt_toolkit to textual, maybe we won't even need PyYAML anymore so it's better to switch from yaml to json format for now.