From: Harsh Donga <harsh-7+aFW328pE6p1wGUEcWPqti2O/JbrIOy@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: FIguring out pandoc AST and types
Date: Thu, 16 Sep 2021 04:52:13 -0700 (PDT) [thread overview]
Message-ID: <68431aed-736c-425d-8745-14ffdc5468a9n@googlegroups.com> (raw)
In-Reply-To: <yh480k35q63exs.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 2120 bytes --]
Thanks for continued support sir,
I had few couple of doubts,
What does Attr
<https://hackage.haskell.org/package/pandoc-types-1.22/docs/Text-Pandoc-Definition.html#t:Attr>
mean?
And can you explain type Meta
<https://hackage.haskell.org/package/pandoc-types-1.22/docs/Text-Pandoc-Definition.html#t:Meta>?,
it's going a bit over my head
Thanks in advance!
On Wednesday, 15 September 2021 at 05:09:35 UTC+5:30 John MacFarlane wrote:
> Harsh Donga <ha...-7+aFW328pE6p1wGUEcWPqti2O/JbrIOy@public.gmane.org> writes:
>
> > Thank you for your response,
> >
> > It is getting really hard for me to parse and build pandoc using pandoc
> > types, as I am Haskell beginner.
> >
> > Please correct me if I am wrong, but the only way to see the JSON output
> is
> > by trying out pandoc? I mean for covering all the pandoc-types, I will
> have
> > to put everything in a document then parse using pandoc?
> > And then figure out by looking at output how actually all types are
> stored
> > in JSON?
>
> There isn't complete documentation of the JSON format we use,
> but it's all very regular and can be predicted from the AST given
> a few examples. Pandoc can be used to give you those examples.
>
> Or, you can look at the ToJSON and FromJSON instance definitions
> in the source code for Text.Pandoc.Definition and figure it out
> from that.
>
> However, if what you want to do is to use Haskell to create a
> pandoc AST, then you don't need to worry about JSON at all. JSON
> is just a serialization format we use for communicating with
> non-Haskell programs. For building a document, what you want is
> Text.Pandoc.Builder, as I said. The documentation contains an
> example to get you started.
>
--
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/68431aed-736c-425d-8745-14ffdc5468a9n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 2918 bytes --]
next prev parent reply other threads:[~2021-09-16 11:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-09 8:45 Harsh Donga
[not found] ` <4bd5ecbc-bd1d-442a-9558-6724174f77fcn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-09-09 17:20 ` John MacFarlane
[not found] ` <m24kat3btu.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>
2021-09-14 12:28 ` Harsh Donga
2021-09-14 12:30 ` Harsh Donga
[not found] ` <3a59eb3c-352f-49f4-89f8-465aa7e86750n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-09-14 23:39 ` John MacFarlane
[not found] ` <yh480k35q63exs.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2021-09-16 11:52 ` Harsh Donga [this message]
[not found] ` <68431aed-736c-425d-8745-14ffdc5468a9n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-09-16 16:40 ` John MacFarlane
[not found] ` <m2ilz0lbie.fsf-d8241O7hbXoP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org>
2021-09-17 4:18 ` Harsh Donga
[not found] ` <4b3e7960-d144-44e0-9b48-a044db45f885n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-09-17 19:25 ` 'Daniel Gnoutcheff' via pandoc-discuss
[not found] ` <b467908f-a4ce-35b9-ba30-ef55e9e70958-rbQqYLFhARYurNyw8EiOWEB+6BGkLq7r@public.gmane.org>
2021-09-18 10:53 ` BPJ
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=68431aed-736c-425d-8745-14ffdc5468a9n@googlegroups.com \
--to=harsh-7+afw328pe6p1wguecwpqti2o/jbrioy@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).