From mboxrd@z Thu Jan 1 00:00:00 1970 From: agzam.ibragimov@gmail.com Subject: Re: Feature request: results type json Date: Wed, 28 Mar 2018 21:19:18 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a113fd928fde80e05687f8f8d" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1ITk-0002I5-2Y for emacs-orgmode@gnu.org; Wed, 28 Mar 2018 17:19:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f1ITi-00005Z-QM for emacs-orgmode@gnu.org; Wed, 28 Mar 2018 17:19:32 -0400 Received: from mail-io0-x231.google.com ([2607:f8b0:4001:c06::231]:35947) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f1ITi-00005A-K5 for emacs-orgmode@gnu.org; Wed, 28 Mar 2018 17:19:30 -0400 Received: by mail-io0-x231.google.com with SMTP id o4so5233067iod.3 for ; Wed, 28 Mar 2018 14:19:30 -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: John Kitchin Cc: org-mode-email --001a113fd928fde80e05687f8f8d Content-Type: text/plain; charset="UTF-8" Hmm, it works for emacs-lisp, however I specifically wanted to use it with ob-sql, and can't find a way. On Wed, Mar 28, 2018 at 2:05 PM John Kitchin wrote: > 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 <(412)%20268-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. >> >> > --001a113fd928fde80e05687f8f8d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hmm, it works for emacs-lisp, however I specifically wante= d to use it with ob-sql, and can't find a way.=C2=A0=C2=A0

On Wed, Mar 28, 2018 at 2:05 PM Jo= hn Kitchin <jkitchin@andrew.c= mu.edu> wrote:
Does this do what you want:

#+BEGIN_SRC emacs-l= isp :wrap json
(json-encode '((type . "text")))
#+END_SRC

#+RESULTS:
#+BEGIN_json=
{"type":"text"}
#+END_json

John

--------------------------= ---------
Professor John Kitchin=C2=A0
Doherty Hall A207F
Departme= nt of Chemical 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.


--001a113fd928fde80e05687f8f8d--