In Elisp, I want to insert the contents of the "gazonk" JSON block into a variable.
#+name: gazonk
#+begin_src json
{
xyzzy "
}
#+end_src
, but I just get "End of file during parsing"
#+BEGIN_SRC elisp :noweb yes
(setq example-data "<<gazonk>>")
#+END_SRC
Obviously, it's not valid JSON, but I want to insert the verbatim contents;)
EDIT: Here is a better example:
Here's valid JSON
#+name: gazonk
#+begin_src json
{
"GivenName" : "Mortimer",
"SurName" : "Smith",
"NameSuffixText" : "Sr",
"PreferredName" : "Morty",
}
#+end_src
Here's valid JSON, but enclosed, so not really valid;)
#+name: gazonk_enclosed
#+begin_src json
"
{
"GivenName" : "Mortimer",
"SurName" : "Smith",
"NameSuffixText" : "Sr",
"PreferredName" : "Morty",
}
"
#+end_src
This doesn't work with valid json
#+BEGIN_SRC elisp :results verbatim drawer :noweb yes
(setq data <<gazonk>>)
#+END_SRC
, but this works
#+BEGIN_SRC elisp :results verbatim drawer :noweb yes
(setq data <<gazonk_enclosed>>)
#+END_SRC