-
Notifications
You must be signed in to change notification settings - Fork 30
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
Make the json formatting bearable #1
Comments
Hi, do you mean json syntax highlighting in request body? That should be possible, but I haven't figured out how sophisticated syntax highlighting works yet, currently it's done by regular expression :( |
Yes, maybe using sth like polymode? https://github.com/vspinu/polymode could be a first step |
I don't think that would be a good enhancement for ob-http since org mode already provides most what you need. I.e. you can get syntax highlighted json by using a standard src block:
The only problem is that you don't want to evaluate this src block but just use its contents. I found no standard way in org mode to do this, so I wrote a small elisp helper function:
Then you can do this in your http src block:
In fact I use this when I need to write longer jq scripts and passing them as a
|
On second thought, I figured you don't even need my function. Vanilla org mode is enough to achieve what you want. Just use a json example blog:
Then you can use it directly as input
That doesn't work for |
Hello, this project is awesome, thank you for it. I have one suggestion though, can you make it so that we have json formatting by default? or sth like that? to ensure we POST valid data.
The text was updated successfully, but these errors were encountered: