From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: Feature request: results type json Date: Wed, 28 Mar 2018 14:05:03 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="089e082f8da07869db05687f5c0c" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1IFn-0007QK-Up for emacs-orgmode@gnu.org; Wed, 28 Mar 2018 17:05:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f1IFm-0001ub-Rp for emacs-orgmode@gnu.org; Wed, 28 Mar 2018 17:05:07 -0400 Received: from mail-wr0-x22f.google.com ([2a00:1450:400c:c0c::22f]:37636) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f1IFm-0001u6-IW for emacs-orgmode@gnu.org; Wed, 28 Mar 2018 17:05:06 -0400 Received: by mail-wr0-x22f.google.com with SMTP id l49so3514977wrl.4 for ; Wed, 28 Mar 2018 14:05:06 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Ag Ibragimov Cc: org-mode-email --089e082f8da07869db05687f5c0c Content-Type: text/plain; charset="UTF-8" Does this do what you want: #+BEGIN_SRC emacs-lisp :wrap json (json-encode '((type . "text"))) #+END_SRC #+RESULTS: #+BEGIN_json {"type":"text"} #+END_json John ----------------------------------- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Wed, Mar 28, 2018 at 1:42 PM, Ag Ibragimov wrote: > > Sorry, I don't know the best medium to convey ideas and I'm afraid not > qualified (familiar with org-mode codebase) to submit a PR for this. > I wonder how difficult would be to > add the possibility to have babel src block results to be rendered as > json? > Basically a new result type https://orgmode.org/manual/ > results.html#results > > Thank you. > > --089e082f8da07869db05687f5c0c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Does this do what you want:

#+BEGI= N_SRC emacs-lisp :wrap json
(json-encode '((type . "text= ")))
#+END_SRC

#+RESULTS:
#+BEGIN_json
{"type":"text"}
#+END= _json

John

-----------------------------------=
Professor John Kitchin=C2=A0
Doherty Hall A207F
Department of Che= mical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
= 412-268-7803

On Wed, Mar 28, 2018 at 1:42 PM, Ag Ibragimo= v <agzam.ibragimov@gmail.com> wrote:

Sorry, I don't know the best medium to convey ideas and I'm afraid = not
qualified (familiar with org-mode codebase) to submit a PR for this.
I wonder how difficult would be to
add the possibility to have babel src block results to be rendered as
json?
Basically a new result type https://orgmode.org/manua= l/results.html#results

Thank you.


--089e082f8da07869db05687f5c0c--