diff options
author | Karl Berry <karl@freefriends.org> | 2024-10-01 19:51:04 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-10-01 19:51:04 +0000 |
commit | f36cf8b9cb56d24e6980acdb3420981dd1a38e62 (patch) | |
tree | e4f9a2cb8779c8ff27d2da7d256a543dd8855c1b /Master/texmf-dist/doc | |
parent | 856b810922e113093655a9a3263536b9fb8f0f4f (diff) |
jsonparse (1oct24)
git-svn-id: svn://tug.org/texlive/trunk@72442 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/latex/jsonparse/README.md | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/jsonparse/jsonparse-doc.pdf | bin | 430658 -> 434185 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/jsonparse/jsonparse-doc.tex | 20 |
3 files changed, 19 insertions, 3 deletions
diff --git a/Master/texmf-dist/doc/latex/jsonparse/README.md b/Master/texmf-dist/doc/latex/jsonparse/README.md index b65f7c03c34..38d102d4b92 100644 --- a/Master/texmf-dist/doc/latex/jsonparse/README.md +++ b/Master/texmf-dist/doc/latex/jsonparse/README.md @@ -1,4 +1,4 @@ -![Version 0.9.0](https://img.shields.io/badge/version-0.9.0-blue) +![Version 0.9.1](https://img.shields.io/badge/version-0.9.1-blue) ![Jason, the JSON parsing horse](https://github.com/jasperhabicht/jsonparse/assets/6378801/ddfddc70-bf5f-4121-ba45-4b9128875d85) diff --git a/Master/texmf-dist/doc/latex/jsonparse/jsonparse-doc.pdf b/Master/texmf-dist/doc/latex/jsonparse/jsonparse-doc.pdf Binary files differindex 4efe6dd3009..f80b04d0cc8 100644 --- a/Master/texmf-dist/doc/latex/jsonparse/jsonparse-doc.pdf +++ b/Master/texmf-dist/doc/latex/jsonparse/jsonparse-doc.pdf diff --git a/Master/texmf-dist/doc/latex/jsonparse/jsonparse-doc.tex b/Master/texmf-dist/doc/latex/jsonparse/jsonparse-doc.tex index 801970d4194..5b643a7af48 100644 --- a/Master/texmf-dist/doc/latex/jsonparse/jsonparse-doc.tex +++ b/Master/texmf-dist/doc/latex/jsonparse/jsonparse-doc.tex @@ -11,8 +11,8 @@ % This work has the LPPL maintenance status `maintained'. % \documentclass[a4paper]{article} -\def\jsonparsefileversion{0.9.0} -\def\jsonparsefiledate{27 August 2024} +\def\jsonparsefileversion{0.9.1} +\def\jsonparsefiledate{21 September 2024} \usepackage[T1]{fontenc} \usepackage{Alegreya} @@ -201,6 +201,7 @@ \changes{v0.8.6}{2024/05/09}{Bug fix in nesting function.} \changes{v0.8.7}{2024/08/08}{Corrections in documentation, error messages.} \changes{v0.9.0}{2024/08/27}{Adaption to updated verbatim tokenization.} +\changes{v0.9.1}{2024/09/21}{Added functions to test for valid JSON numbers.} \begin{document} \vspace*{-1cm} @@ -461,7 +462,14 @@ replace/|horizontal tab|={<string>} These keys can be used to set the replacement text for the JSON escape sequences \macro{\b} (backspace), \macro{\f} (formfeed), \macro{\n} (linefeed), \macro{\r} (carriage return) and \macro{\t} (horizontal tab). The default replacement string is a space. Only strings can be used as replacement. These replacements take place only during typesetting. These keys can be set using \macro{\JSONParseSet}. They can also be set locally as option to the commands \macro{\JSONParseValue}, \macro{\JSONParseArrayValues} and \macro{\JSONParseArrayValuesMap}. +\begin{macrodef} +|check num| +|check num|={<boolean>} +\end{macrodef} +If set to \macro{false}, the key \macro{check num} omits an internal check of numerical expressions against the JSON specification for numbers. Turning off this feature can increase the parsing speed. +This key can be set using \macro{\JSONParseSet}. It can also be set locally as option to the commands \macro{\JSONParse} and \macro{\JSONParseFromFile}. + \subsection{L3 commands} \begin{macrodef} @@ -479,6 +487,14 @@ The command \macro{\jsonparse_parse_to_prop:Nn} creates the token variable given \end{macrodef} The command \macro{\jsonparse_parse_to_prop:Nn} processes the token variable given as the first arguments as property list and filters it according to the key given as second argument. Filtering means that for every entry in the property list, the key of this entry is compared against the key given to the command. If the key in the property list starts with the given key, the matching part is removed from the key in the property list. If the keys do not match, the entry is completely removed from the property list. +\begin{macrodef} +|\jsonparse_if_num:nTF| {<string>} {<true code>} {<false code>} +|\jsonparse_if_num:nT| {<string>} {<true code>} +|\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. + % ===== \printchanges |