- Fix handling of decoding errors when Lua is compiled with
LUA_NOCVTN2S.
- Update to 2.7:
- Enable working with newer versions of LPeg where the
"version" field is no longer a function.
- Fix error messages when an encoding error happens in an
ordered dictionary.
- Update to 2.6:
- The decode function is no longer automatically replaced by
the version implemented using LPeg, but an LPeg-enabled
copy of the module has to be requested explicitly with
the function use_lpeg. This was changed to improve the
predictability of the code and make audits more reliable.
- The LPeg-version of the decode function now reports
unterminated strings, arrays and objects with the position
where they started rather than where parsing failed which was
usually at the end of the input string. This was already the
behavior of the pure-Lua-implementation.
- Fixed a bug where entries in a dictionary were not put in the
desired order when their value was the boolean false.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-dkjson?expand=0&rev=13
71 lines
1.9 KiB
RPMSpec
71 lines
1.9 KiB
RPMSpec
#
|
|
# spec file for package lua-dkjson
|
|
#
|
|
# Copyright (c) 2024 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define flavor @BUILD_FLAVOR@
|
|
%define mod_name dkjson
|
|
%define uptag 2.8
|
|
Version: 2.8.0
|
|
Release: 0
|
|
Summary: David Kolf's JSON module for Lua
|
|
License: MIT
|
|
Group: Development/Libraries/Other
|
|
URL: http://dkjson.org/
|
|
Source: http://dkolf.de/dkjson-lua/dkjson-%{uptag}.tar.gz
|
|
BuildRequires: %{flavor}-devel
|
|
BuildRequires: lua-macros
|
|
Requires: %{flavor}
|
|
Requires: %{flavor}-lpeg
|
|
BuildArch: noarch
|
|
%lua_provides
|
|
%if "%{flavor}" == ""
|
|
Name: lua-dkjson
|
|
ExclusiveArch: do_not_build
|
|
%else
|
|
Name: %{flavor}-dkjson
|
|
%endif
|
|
|
|
%description
|
|
dkjson is a module for encoding and decoding JSON data. It
|
|
supports UTF-8.
|
|
|
|
JSON (JavaScript Object Notation) is a format for serializing
|
|
data based on the syntax for JavaScript data structures.
|
|
|
|
dkjson is written in Lua without any dependencies, but
|
|
when LPeg is available dkjson can use it to speed up decoding.
|
|
|
|
%prep
|
|
%autosetup -p1 -n dkjson-%{uptag}
|
|
|
|
%build
|
|
/bin/true
|
|
|
|
%install
|
|
install -D -m 0644 -t %{buildroot}%{lua_noarchdir} -p dkjson.lua
|
|
|
|
%check
|
|
lua%{lua_version} speedtest.lua dkjson
|
|
lua%{lua_version} jsontest.lua
|
|
|
|
%files
|
|
# license is included in readme.txt file
|
|
%doc versions.txt readme.txt
|
|
%{lua_noarchdir}/%{mod_name}*
|
|
|
|
%changelog
|