Alright, so having additional logic to check conformity beforehand is the key! Thank you so much! Really appreciate the support I get always! One of the best community! On Monday, 12 September 2022 at 16:20:14 UTC+5:30 fiddlosopher wrote: > Pandoc's `-f json` expects a JSON encoding of a Pandoc AST; it must > conform to the constraints on the AST given by the types. > If `pandoc -f json -t native` fails, it means that you haven't got a valid > JSON serialization of a pandoc AST. So, you're not even getting to the > writers. > > > > On Sep 12, 2022, at 12:40 PM, Harsh Donga > wrote: > > > > If it's related to that, are there any options in Pandoc to skip or > resolve it? > > I believe it might be a reading issue (Since i am talking about ill > formatted structure) > > > > Let's say here i am trying to make a BulletList but insert a heading > object in between (out of structure) (Please refer first heading object > inside bulletlist) > > It does not conform to : > https://hackage.haskell.org/package/pandoc-types-1.22/docs/Text-Pandoc-Definition.html#t:Block > (BulletList [[Block]]) > > My intention to ask the question is if i can skip this element and > process the rest to HTML? > > > > PFA : synthetically made Pandoc AST > > > > On Monday, 12 September 2022 at 16:02:58 UTC+5:30 fiddlosopher wrote: > > Also, verify that your issue is not actually with reading the JSON. > > > > Try pandoc -f json -t native > > > > If this raises an error, then the issue is in how your JSON is > formatted. > > > > On Sep 12, 2022, at 12:24 PM, John MacFarlane > wrote: > > > > > > Generally this shouldn't happen; writers should be able to handle > arbitrary ASTs. > > > So let us know the particulars. Give a short example sufficient to > reproduce the issue you're seeing. > > > > > >> On Sep 12, 2022, at 11:28 AM, Harsh Donga > wrote: > > >> > > >> Hey folks, > > >> > > >> Context : I am trying to convert Pandoc AST to HTML > > >> > > >> I would like to know if there is any exception handling done if let's > say a particular block in Pandoc AST is erroneous (wrongly structured or > placed). > > >> For now, pandoc command (pandoc -t html pandoc.json -o pandoc.html), > returns > > >> err at block[x][y] > > >> That is the whole conversion fails. > > >> > > >> Can that particular element be skipped or something else can be done? > > >> > > >> > > >> Thanks in advance! > > >> Regards, > > >> Harsh > > >> > > >> -- > > >> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > >> To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/ab7b37d0-be67-4e93-8298-31f7069fe2a8n%40googlegroups.com. > > > > > > > > > > -- > > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/8e35756c-09ea-4050-9bf2-7c82c46e3e41n%40googlegroups.com > . > > > > -- 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/3d3e093e-01a9-4d79-8ae4-4f402a88d69an%40googlegroups.com.