Pop plugin · Convert

YAML ↔ JSON

Convert selected JSON to YAML or YAML to JSON, keeping key order.

Works with Selected textFree

How to use it

Select something, hold the right mouse button, swipe. The animation plays the steps one after another; click a step to see it again.

  1. Select JSON or YAML
  2. Hold the right mouse buttonAbout a quarter of a second. A short click still opens the usual menu.
  3. Swipe to “YAML ↔ JSON” and let goIt sits on the ring where you put it, and it’s always in All Actions.
  4. JSON becomes YAMLKeys stay in the same order.
  5. Press ⌘C to copy itSelect YAML instead and you get JSON.

What it does

Select JSON to get YAML, or select YAML, such as a config file or a CI workflow, to get JSON.

Keys stay in their order, and numbers are kept exactly as written.

Understands comments, multi-line text (| and >), “- key: value”, [a, b] and {a: 1}. If something’s wrong, it tells you which line.

Copy the result or replace the selection with it; JSON made from YAML can also be copied minified.

Install it

Plugins aren’t part of the Pop download. Install this one when you need it.

1From Settings

In Pop’s Settings › Actions, find “YAML ↔ JSON” under Plugins at the top and click Install. It downloads from Pop’s GitHub release in a few seconds and works right away, without a restart.

2Or from the ring

Open All Actions on the ring and search for “YAML ↔ JSON”. Plugins that aren’t installed are listed after your actions: click it to install, and it runs right away if it can handle what you selected.

3Then use it your way

Put it on the ring in Settings › Ring, give it a shortcut, or run it from Shortcuts and scripts with its link:

pop://run?plugin=yamlJSON

Uninstall it from the same list when you no longer need it: the plugin and its settings are deleted. After Pop updates, installed plugins are updated with it, and with iCloud sync on, what you install syncs to your other Macs.