Pop plugin · Developer
JSON to Code
Generate TypeScript, Swift, Go and Kotlin type definitions from the selected JSON.
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.
- Select some JSON
- Hold the right mouse buttonAbout a quarter of a second. A short click still opens the usual menu.
- Swipe to “JSON to Code” and let goIt sits on the ring where you put it, and it’s always in All Actions.
- Types for TypeScript appear
- Switch to Swift or Go
- Copy the code
What it does
Select a JSON object or array and get type definitions for TypeScript, Swift, Go and Kotlin.
Nested objects become their own types; arrays, numbers, booleans and nulls get the right types.
Switch languages on the card and copy the code.
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 “JSON to Code” 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 “JSON to Code”. 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=jsonTypesUninstall 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.
More in Developer
Hash
Compute MD5, SHA-1, SHA-256 and SHA-512 of text or files
QR Code
Generate a QR code from text or a link (letters and digits can also become a barcode); with an image selected, read the QR codes and barcodes in it
Base64 Image
Show Base64 or data: image data as an image to copy, save or pin
Random
Generate UUIDs, passwords and random numbers to paste into the current field
Parse Link
Split a link into scheme, host, path and decoded parameters, and remove tracking parameters such as utm_source
Decode JWT
Decode the selected JWT and list claims such as issuer and expiry (decoding only; the signature isn’t verified)