From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32844 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?J=C3=B6rn_K?= Newsgroups: gmane.text.pandoc Subject: Re: Pandoc JSON schema Date: Mon, 19 Jun 2023 02:32:17 -0700 (PDT) Message-ID: <16e8b004-f3c8-4a4e-a6e6-856f45f3bdd5n@googlegroups.com> References: <87bmkwdcdr.fsf@zeitkraut.de> <20171024164746.GC90469@protagoras> <20171024165310.GA94787@protagoras> <877evjd5yg.fsf@zeitkraut.de> <8d53751b-a59c-43fb-a7e1-4f5079903e28n@googlegroups.com> <87pme55qyx.fsf@zeitkraut.de> <81054dc7-a893-4f84-9ce4-ea90f997b12fn@googlegroups.com> <87leot5otd.fsf@zeitkraut.de> <874ju8wn22.fsf@zeitkraut.de> <4e6dd89d-1dd0-40bb-a760-e3468c5b2403n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2024_1449988749.1687167137577" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33708"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDFITCUFZ4JRBI6BYCSAMGQE3GXR35A-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jun 19 11:32:23 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f56.google.com ([209.85.161.56]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qBBFG-0008ZO-S9 for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 19 Jun 2023 11:32:22 +0200 Original-Received: by mail-oo1-f56.google.com with SMTP id 006d021491bc7-55e420fa4b5sf702831eaf.2 for ; Mon, 19 Jun 2023 02:32:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1687167141; x=1689759141; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=kRtWkyZVv36XI5l4quhJAbrnPOX7+ETz9hSsB4nBelQ=; b=SXRlVaQgdgqfjIV3cHS3NMDpdn5pyHWlS6lns1xMWvniVGO9zzhVsGMPFh8aWelLdb hMLXhgZlF5Ef/aA9wry3SuUWkDUWErqRbec5aniXkJexxYTGdBXGj6WoE+j9ckMRs+6d K1D8dujj1QNj2y+7/FUEQyfutCuXmSbbAbuBEhWFjQQd98VIJ5R299HtaTK8Izyn3G7W rvy0CpPGcJvJ+m85rrHHTpwvFEt8GEN44Z0ftoA0fZVD3Uwu66zs5r3JXKiHM71pICJJ l7X6o0dpMf9xvi50+B4gZT3arF8hhAnYJwzNRl9GcL7wXirLd4nOU2EpgfrhyxPRs/YS INQQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687167141; x=1689759141; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=kRtWkyZVv36XI5l4quhJAbrnPOX7+ETz9hSsB4nBelQ=; b=RuXfVxbP0FABxGhop0XmxIZARSqAT15iexcE3PPAceKTGxmAhtBazg4JyUp9mhifJb YX/6pZTmqN3tQB4naRDdNVVkqkIdqngOW7kMubz/fqe7RvUBiKxFCsObdoTZwuQqy84m WJe7XTpB8nDNWCl7V5aMF4Ujovq6EJVTjioR0byafN4adh7ke3wj4QTFEmFWkSpS0cpO 2ugx8i6zvoGLIpOFEsWMs8aEUzjI4x6XENuGPWz5Tgx3AW0La72H1XzPa4oLFMcpnlgX vGTRR0Pzlh3Me+Jf8XG6bydio4Nr2vojLv8MnZvuMdiXLvHf0o6xtulUdZwLnomz4s7U dMFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687167141; x=1689759141; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=kRtWkyZVv36XI5l4quhJAbrnPOX7+ETz9hSsB4nBelQ=; b=RYkcUxXrj89vXlStGD5GXFT8HSRYp6+1K+LcS1hmvhQldFfGw95Boif0bfi3+7cGaz 3jC91Z7pBr39dk+BPE8GnbuT8ACpymrs0mhxbqC3MnIbbWbjafiuqAs2tiV0g+peEmRO GDKsxEfIVJY+h55/VeEAWFBbkl4D1ssL3QB6TeBybOJgTg71a+szPKmr8SwGOyERHx9M BlZ3JJrFVtJllC9d9IZfAB74lvaQD/SXFU9VSyEwK3QkIRHhfNHByrLEeSntQ/ioTeu7 30ms16+y2CacNs04BKs8As+OYGMNosbLUV+AOW40v7X+nCgOMT Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDxfEMJuoLlOCpPsUgj1wbuOap/vZDYiFLwO//5LI/VorpMXIrF1 jdo59TBcSs+wAbmdEpV6K/w= X-Google-Smtp-Source: ACHHUZ4SsIecuz2PCdH0U05/cZSCH4Ul/YEwnpKRYTKbnPTciqHuB+s4wgUeGvp90BprN6O9Z0zpUQ== X-Received: by 2002:a4a:d84b:0:b0:55e:412d:13de with SMTP id g11-20020a4ad84b000000b0055e412d13demr1799037oov.8.1687167141531; Mon, 19 Jun 2023 02:32:21 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a4a:e9e2:0:b0:55a:ef1d:8b5c with SMTP id w2-20020a4ae9e2000000b0055aef1d8b5cls1053102ooc.1.-pod-prod-03-us; Mon, 19 Jun 2023 02:32:18 -0700 (PDT) X-Received: by 2002:a4a:e04a:0:b0:54f:9f36:f14b with SMTP id v10-20020a4ae04a000000b0054f9f36f14bmr1780382oos.0.1687167138474; Mon, 19 Jun 2023 02:32:18 -0700 (PDT) In-Reply-To: X-Original-Sender: tarsoniusvonbethana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:32844 Archived-At: ------=_Part_2024_1449988749.1687167137577 Content-Type: multipart/alternative; boundary="----=_Part_2025_1668050988.1687167137577" ------=_Part_2025_1668050988.1687167137577 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi! Is stumbled upon this while trying to use json-schema to enforce a certain= =20 format and content of a markdown document. Our use-case is enforcing the=20 layout and data entered in standardized technical reports for a project of= =20 our institute. Basically I have a json-schema prepared and have a test in which a python= =20 script (using jsonschema) validated Pandoc's json output.=20 So far it has proven quite mighty, but sadly it is cumbersome to write the= =20 schema manually as there is quite some nesting of properties involved. Currently I am pondering if one could use a (Lua) writer to generate such= =20 a schema. One could lookout for certain attributes to set json-schema=20 validation options. This way the feature of validating the contents of a=20 document against a schema would come one step closer to less json prone=20 users. Is there a way to get the pandoc type string of a pandoc object in Lua? I= =20 mean the value which goes into the t property of json. I mean one can=20 simply map the output of pandoc.util.type with knowledge of the current=20 section, but this seems less desirable than getting the string directly=20 from pandoc. Thanks! J=C3=B6rn John MacFarlane schrieb am Donnerstag, 29. Dezember 2022 um 21:37:08 UTC+1: > Is there a way to programatically test a document against this schema? > > > On Dec 28, 2022, at 1:44 AM, Harsh Donga =20 > wrote: > >=20 > > PFA: pandoc AST json schema (pandoc-types 1.22) > >=20 > > --=20 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 e= mail 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/16e8b004-f3c8-4a4e-a6e6-856f45f3bdd5n%40googlegroups.com. ------=_Part_2025_1668050988.1687167137577 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi!

Is stumbled upon this while trying to u= se json-schema to enforce a certain format and content of a markdown docume= nt. Our use-case is enforcing the layout and data entered in standardized t= echnical reports for a project of our institute.

Basically I have a json-schema prepared and have a test in which a p= ython script (using jsonschema) validated Pandoc's json output.
So far it has proven quite mighty, but sadly it is cumbersome to writ= e the schema manually as there is quite some nesting of properties involved= .

=C2=A0Currently I am pondering if one could us= e a (Lua) writer to generate such a schema. One could lookout for certain a= ttributes to set json-schema validation options. This way the feature of va= lidating the contents of a document against a schema would come one step cl= oser to less json prone users.

Is there a = way to get the pandoc type string of a pandoc object in Lua? I mean the val= ue which goes into the t property of json. I mean one can simply map the ou= tput of pandoc.util.type with knowledge of the current section, but this se= ems less desirable than getting the string directly from pandoc.
=
Thanks!

J=C3=B6rn
John = MacFarlane schrieb am Donnerstag, 29. Dezember 2022 um 21:37:08 UTC+1:
=
Is there a way to= programatically test a document against this schema?

> On Dec 28, 2022, at 1:44 AM, Harsh Donga <ha...-7+aFW328pE6p1wGUEcWPqti2O/JbrIOy@public.gmane.org> wrote:
>=20
> PFA: pandoc AST json schema (pandoc-types 1.22)
>=20

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/16e8b004-f3c8-4a4e-a6e6-856f45f3bdd5n%40googlegroups.= com.
------=_Part_2025_1668050988.1687167137577-- ------=_Part_2024_1449988749.1687167137577--