texlive[73147] Master/texmf-dist: jsonparse (17dec24)
commits+karl at tug.org
commits+karl at tug.org
Tue Dec 17 22:11:02 CET 2024
Revision: 73147
https://tug.org/svn/texlive?view=revision&revision=73147
Author: karl
Date: 2024-12-17 22:11:02 +0100 (Tue, 17 Dec 2024)
Log Message:
-----------
jsonparse (17dec24)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/jsonparse/README.md
trunk/Master/texmf-dist/doc/latex/jsonparse/jsonparse-doc.pdf
trunk/Master/texmf-dist/doc/latex/jsonparse/jsonparse-doc.tex
trunk/Master/texmf-dist/tex/latex/jsonparse/jsonparse.sty
Modified: trunk/Master/texmf-dist/doc/latex/jsonparse/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/jsonparse/README.md 2024-12-17 21:10:48 UTC (rev 73146)
+++ trunk/Master/texmf-dist/doc/latex/jsonparse/README.md 2024-12-17 21:11:02 UTC (rev 73147)
@@ -1,4 +1,4 @@
-
+

Modified: trunk/Master/texmf-dist/doc/latex/jsonparse/jsonparse-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/jsonparse/jsonparse-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/jsonparse/jsonparse-doc.tex 2024-12-17 21:10:48 UTC (rev 73146)
+++ trunk/Master/texmf-dist/doc/latex/jsonparse/jsonparse-doc.tex 2024-12-17 21:11:02 UTC (rev 73147)
@@ -11,8 +11,8 @@
% This work has the LPPL maintenance status `maintained'.
%
\documentclass[a4paper]{article}
-\def\jsonparsefileversion{0.9.9}
-\def\jsonparsefiledate{1 December 2024}
+\def\jsonparsefileversion{0.9.10}
+\def\jsonparsefiledate{10 December 2024}
\usepackage[T1]{fontenc}
\usepackage{Alegreya}
@@ -207,6 +207,7 @@
\changes{v0.9.6}{2024/10/31}{Allowing for multiple return values when mapping over arrays.}
\changes{v0.9.7}{2024/11/05}{Streamlining of code, ensuring backward compatibility.}
\changes{v0.9.8}{2024/11/19}{Bug fixes, adding possibility to store value in token list.}
+\changes{v0.9.10}{2024/12/10}{Enhanced backward compatibility; switch to linked property lists.}
\begin{document}
\vspace*{-1cm}
@@ -567,7 +568,7 @@
|\jsonparse_if_num:nF| {<string>} {<false code>}
|\jsonparse_if_num_p:n| {<string>}
\end{macrodef}
-The command \macro{\jsonparse_if_num:nTF} checks whether a string is a valid JSON number according the relevant specification. It executes the true code if the string is a valid JSON number and the false code if not. The variants \macro{\jsonparse_if_num:nT} and \macro{\jsonparse_if_num:nF} work accordingly. The command \macro{\jsonparse_if_num_p:n} returns a boolean true or false.
+The command \macro{\jsonparse_if_num:nTF} checks whether a string is a valid JSON number according the relevant specification. It executes the true code if the string is a valid JSON number and the false code if not. The variants \macro{\jsonparse_if_num:nT} and \macro{\jsonparse_if_num:nF} work accordingly. The command \macro{\jsonparse_if_num_p:n} returns a boolean true or false (i.\,e. \macro{\c_true_bool} or \macro{\c_false_bool}).
% =====
Modified: trunk/Master/texmf-dist/tex/latex/jsonparse/jsonparse.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/jsonparse/jsonparse.sty 2024-12-17 21:10:48 UTC (rev 73146)
+++ trunk/Master/texmf-dist/tex/latex/jsonparse/jsonparse.sty 2024-12-17 21:11:02 UTC (rev 73147)
@@ -10,9 +10,21 @@
%
% This work has the LPPL maintenance status `maintained'.
%
-\ProvidesExplPackage {jsonparse} {2024-12-01} {0.9.9}
+\ProvidesExplPackage {jsonparse} {2024-12-10} {0.9.10}
{A handy way to parse, store and access JSON data from files or strings in LaTeX documents}
+\msg_new:nnn { jsonparse } { old-kernel } {
+ LaTeX ~ kernel ~ too ~ old. \iow_newline:
+ The ~ jsonparse ~ package ~ does ~ not ~ support ~ this ~ LaTeX ~ version. \iow_newline:
+ Please ~ update ~ to ~ a ~ newer ~ version.
+}
+
+\cs_if_exist:NF \ProcessKeyOptions {
+ \msg_critical:nn { jsonparse } { old-kernel }
+}
+
+% ===
+
\bool_new:N \l__jsonparse_debug_mode_bool
\keys_define:nn { jsonparse / global } {
@@ -271,9 +283,29 @@
\prg_generate_conditional_variant:Nnn \str_if_eq:nn { en , eV } { T , F , TF }
\prg_generate_conditional_variant:Nnn \str_if_eq:nn { Vn } { p }
-\prop_new:N \g_jsonparse_entries_prop
-\prop_new:N \l__jsonparse_temp_prop
+% ===
+\bool_new:N \l__jsonparse_compat_bool
+
+\cs_if_exist:NF \IfExplAtLeastTF {
+ \cs_new:Npn \IfExplAtLeastTF #1#2#3 { }
+ \bool_set_true:N \l__jsonparse_compat_bool
+}
+
+\IfExplAtLeastTF { 2024-12-09 } { } {
+ \bool_set_true:N \l__jsonparse_compat_bool
+}
+
+% ===
+
+\bool_if:NTF \l__jsonparse_compat_bool {
+ \prop_new:N \g_jsonparse_entries_prop
+ \prop_new:N \l__jsonparse_temp_prop
+} {
+ \prop_new_linked:N \g_jsonparse_entries_prop
+ \prop_new_linked:N \l__jsonparse_temp_prop
+}
+
\tl_new:N \g__jsonparse_json_tl
\tl_new:N \l__jsonparse_input_tl
\tl_new:N \l__jsonparse_temp_tl
@@ -832,7 +864,11 @@
\NewDocumentCommand { \JSONParsePut } { m m +v } {
\prop_if_exist:NF #1 {
- \prop_new:N #1
+ \bool_if:NTF \l__jsonparse_compat_bool {
+ \prop_new:N #1
+ } {
+ \prop_new_linked:N #1
+ }
}
\prop_gput:Nnn #1 {#2} {#3}
}
@@ -880,7 +916,11 @@
{ \l__jsonparse_externalize_file_name_tl .jsonparse }
\file_input:e { \l__jsonparse_externalize_file_name_tl .jsonparse }
} {
- \prop_new:N #2
+ \bool_if:NTF \l__jsonparse_compat_bool {
+ \prop_new:N #2
+ } {
+ \prop_new_linked:N #2
+ }
\tl_gclear:N \g__jsonparse_json_tl
\group_begin:
\cs_set:Npn \" { \exp_not:N \" }
@@ -925,7 +965,11 @@
{ \l__jsonparse_externalize_file_name_tl .jsonparse }
\file_input:e { \l__jsonparse_externalize_file_name_tl .jsonparse }
} {
- \prop_new:N #2
+ \bool_if:NTF \l__jsonparse_compat_bool {
+ \prop_new:N #2
+ } {
+ \prop_new_linked:N #2
+ }
\tl_gclear:N \g__jsonparse_json_tl
\group_begin:
\cs_set:Npn \" { \exp_not:N \" }
More information about the tex-live-commits
mailing list.