cheshire icon indicating copy to clipboard operation
cheshire copied to clipboard

Possible to support parsing copy-paste JSON?

Open ronnyli opened this issue 2 years ago • 1 comments

Hello, I was curious if it's possible to parse JSON without reading from a file first (or manually creating a valid json string).

Something like the following:

(parse-clipboard-json
{"first_name": "John",
  "last_name": "Smith"})

or alternatively, parse from the clipboard directly?

ronnyli avatar Nov 18 '23 15:11 ronnyli

This is the closest I could find to read/write the system clipboard: https://gist.github.com/exupero/1462ec16d8874dee9ee710257eaf3d3c

I don't think it makes sense for Cheshire to do this directly, but rather use code like that to read the clipboard into a string or stream, and the call the regular Cheshire methods on it.

dakrone avatar Nov 20 '23 18:11 dakrone