public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Json format to rst
@ 2022-07-27 12:11 Mohamed Sabry
       [not found] ` <ec681e8a-930b-4555-9f40-cbeac19a6f25n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Mohamed Sabry @ 2022-07-27 12:11 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 787 bytes --]

I have a json file which I generated from my code. I want to transform this 
json file into rst using pandoc. However, I always get the following error:

JSON parse error: Error in $: JSON missing pandoc-api-version.

I read that the json file needs to be native version of native AST which I 
quite don't understand. Can someone make me understand exactly what is 
happening

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ec681e8a-930b-4555-9f40-cbeac19a6f25n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 1139 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Json format to rst
       [not found] ` <ec681e8a-930b-4555-9f40-cbeac19a6f25n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-07-27 15:39   ` John MacFarlane
  0 siblings, 0 replies; 2+ messages in thread
From: John MacFarlane @ 2022-07-27 15:39 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

`pandoc -f json` is not for converting arbitrary JSON files.  It only works for JSON files that encode a pandoc document in a specific way.  Here's an example:

{"pandoc-api-version":[1,22,2],"meta":{},"blocks":[{"t":"Para","c":[{"t":"Str","c":"Hello"},{"t":"Space"},{"t":"Emph","c":[{"t":"Str","c":"JSON"}]}]}]}


> On Jul 27, 2022, at 5:11 AM, Mohamed Sabry <msabry490-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 
> I have a json file which I generated from my code. I want to transform this json file into rst using pandoc. However, I always get the following error:
> 
> JSON parse error: Error in $: JSON missing pandoc-api-version.
> 
> I read that the json file needs to be native version of native AST which I quite don't understand. Can someone make me understand exactly what is happening
> 
> -- 
> You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ec681e8a-930b-4555-9f40-cbeac19a6f25n%40googlegroups.com.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-27 15:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-27 12:11 Json format to rst Mohamed Sabry
     [not found] ` <ec681e8a-930b-4555-9f40-cbeac19a6f25n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-07-27 15:39   ` John MacFarlane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).