change YAML to JSON for displaying state