Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to support parsing copy-paste JSON? #201

Open
ronnyli opened this issue Nov 18, 2023 · 1 comment
Open

Possible to support parsing copy-paste JSON? #201

ronnyli opened this issue Nov 18, 2023 · 1 comment

Comments

@ronnyli
Copy link

ronnyli commented Nov 18, 2023

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?

@dakrone
Copy link
Owner

dakrone commented Nov 20, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants