Cpanel-JSON-XS

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

        - Fix a compat case with JSON::XS, when convert_blessed is set, but
          allow_blessed not. (GH #105)
        - Improve blessed and stringify tests
        - Work on better inf/nan detection on AIX (#165 Peter Heuchert)
        - Fix documentation for booleans and their types (#162 by Karen Etheridge)

4.19 2020-02-06 (rurban)
        - Fix typed decode memory leak (#160 by Pali).

4.18 2019-12-13 (rurban)
        - Add new method ->type_all_string (#156 by Pali).
          When type_all_string is set then encode method produce stable deterministic
          string types in result JSON.
          This can be an alternative to Cpanel::JSON::XS::Type when having
          deterministic output is required but string JSON types are enough for any
          output.
        - Move SvGETMAGIC() from encode_av() and encode_hv() to encode_sv()
          (#156 by Pali)
        - Add Math::BigInt and Math::BigFloat as recommended dependences
          (#157 by Pali and Grinnz)

4.17 2019-11-04 (rurban)
        - Add Changes tests and fixups (see #155)

4.16 2019-11-04 (rurban)
        - Use Perl_strtod instead of self-made atof (via pow), to
          minimize differences from core string-to-float conversions.
          (#154). Fixes float representation regressions (in the 1e-6
          to 1e-16 range) since 5.22.

4.15 2019-10-21 (rurban)
        - Fix more tests for nvtype long double

4.14 2019-10-15 (rurban)
        - Fix tests for nvtype long double (#153)
        - Fix PREREQ's. E.g. CentOS 7 has not Test::More anymore. (#152 by Pali)

4.13 2019-10-14 (rurban)
        - For JSON_TYPE_INT and JSON_TYPE_FLOAT allow to encode numeric values
          above 2^64 in PV slot via Math::BigInt/Float (#145, #148, #149 by Pali)
        - For JSON_TYPE_INT and JSON_TYPE_FLOAT encoder allow to pass Math::BigInt
          and Math::BigFloat objects with allow_bignum. (#147 by Pali)
        - Fix encoding floating point values above 2^64 in PV slot to JSON_TYPE_INT
          (#148, #150 by Pali)
        - Do not allow serializing objects when convert_blessed is not enabled.
          (#146 by Pali)

4.12 2019-06-11 (rurban)
        - Make encoder independent on Math::BigInt version (#140 by Pali)
        - Rethrow error from eval_sv and eval_pv() (#138, #139 by Pali),
          e.g. when Math::BigInt/BigFloat fails.
        - Fix encoding Inf and NaN from PV and NV slots to JSON_TYPE_INT
          (#137 by Pali)
        - Fix memory corruption in sv_to_ivuv() function (#136 by Pali)
        - Add new method ->require_types (#135 by Pali)
        - Fix typed json encoder conversion from scalar's PV and NV slot to
          JSON_TYPE_INT (#133, #134 by Pali)
        - Fix inconsistency with warnings in typed json encoder (#131 by Pali)
        - Fix Perl 5.8.0 support (#130 by Pali)
        - Fixed minor pod typo (#129 by sheeit)
        - Document invalid recursive callbacks or overloads (#128)

4.11 2019-03-26 (rurban)
        - Fix unicode strings with BOM corrupt ->utf8 state (#125)
          The BOM encoding effects only its very own decode call,
          not its object.

4.10 2019-03-18 (rurban)
        - Fix incr_text refcounts (#123)
        - Add incr_rest testcase (#123)
        - Fix encode_stringify string-overload refcnt problem (#124)
          "Attempt to free unreferenced scalar" with convert_blessed and overload.

4.09 2019-02-15 (rurban)
        - Add seperate allow_dupkeys property, in relaxed (#122)
        - Fixed allow_dupkeys for the XS slow path
        - Silence 2 -Wunused-value warnings
        - Fix ->unblessed_bool to produce modifiable perl structures (PR #121 by Pali)

4.08 2018-11-28 (rurban)
        - Add unblessed_bool property (PR #118 by Pali)

4.07 2018-11-02 (rurban)
        - Silence Gconvert -Wunused-result.
          gcvt returns a string, sprintf int, so suppress the retval

4.06 2018-08-22 (rurban)
        - Fix overloaded eq/ne comparisons (GH #116 by demerphq, GH #117 by Graham Knopp):
          detect strings, protect from endless recursion. false is now ne "True".
          clarify eq/ne rules in the docs.

4.05 2018-08-19 (rurban)
        - Set decoded type (PR #115 by Pali)
        - Add json_type_weaken (PR #114 by Pali)
        - Fix tests for 5.6 (rurban, pali)

4.04 2018-06-22 (rurban)
        - Fix bignum NaN/inf handling (#78 reported by Slaven Rezic)
        - Move author tests to xt/ as suggested in #106, added a make xtest target.
          Fixes a test fail with ASAN.

4.03 2018-06-21 (rurban)
        - Add sereal cpanel_json_xs type (#110 James Rouzier)
        - Fix bencode/bdecode methods in cpanel_json_xs (#111 Fulvio Scapin)
        - Overload ne operator for JSON::PP::Boolean (#107 tevfik1903)
        - Add a missing semicolon to a documentation example (#104 E. Choroba)

4.02 2018-02-27 (rurban)
        - Add encoder indent_length method (#103 rouzier), previously
          hard-coded to 3.

4.01 2018-02-03 (rurban)
        - Fix centos7 locale crash (#101 McA), fix required for all
          threaded perl's < 5.22 with glibc.

4.00 2018-02-02 (rurban,pali)
        - No changes

3.99_03 2018-01-30 (rurban,pali)
        - Fix uselocale() code.
        - Probe for uselocale and xlocale.h with <5.22 threaded.

Changes  view on Meta::CPAN

         Types::Serialiser::Boolean, which is aliased to JSON::PP::Boolean.
         JSON::YAJL::Parser just produces an unbless IV (0|1).
         fix overload of our bools.
         stringify true to "true", false to "0"
       - accept Mojo::JSON::_Bool (#37)
         Mojo does not store their booleans as JSON::PP::Boolean
         as everybody else does.
       - accept is_bool as method call also.
       - implement native encode_sv of the internal sv_yes/sv_no values (#39)
         and map them to json true/false. YAML::XS compatible.
       - pod: add SECURITY CONSIDERATIONS
         added a table of safe and unsafe serializers for comparison.
         Written by JD Lightsey.
         Only JSON and Data::MessagePack are safe by default.
       - With canonical only skip hash keys sorting for actually tied hashes.
         #42 (Sergey Aleynikov)

3.0115 2015-01-31 (rurban)
       - Fix stack corruption when encoding nested objects with FREEZE method,
         #35 (Sergey Aleynikov)

3.0114 2015-01-04 (rurban)
       - Fix bad powl with Freebsd 10 -Duselongdouble. Rather use strtold. #34 + RT #101265

3.0113 2014-12-15 (rurban)
       - t/117_number relax the tests for negative nan, as BSDs also cannot deal with it. #33

3.0112 2014-12-14 (rurban)
       - Add {get_,}stringify_infnan methods and use it in the test, now run-time. #32
         mode 0: null, 1: stringify, 2: inf/nan (invalid JSON) as before.
       - Fix t/117_number tests for Solaris and MSWin32
       - Remove build-time "Do you want to handle inf/nan as strings? Default: null." prompt.
       - Improve docs.

3.0111 2014-12-13 (rurban)
       - Fixed detecting 1.#INF/1.#IND on windows. #28
       - Also detect now -inf and -nan. #28
       - Fixed STRINGIFY_INFNAN return string, length off by one. #28
       - Fixed a non-C99 declaration error on XS.xs:863. Was broken with older MSVC.

3.0110 2014-12-12 (rurban)
       - Fixed one more memory bug with encode of dual-vars to strings,
         esp. with older perl <5.10, leading to eventual panic: realloc.

3.0109 2014-12-12 (rurban)
       - Fixed serious bug with encode of dual-vars to strings, missing
         the ending \0. #31 (Grinnz)

3.0108 2014-12-11 (rurban)
       - Change encode of numbers with dual-strings (int and float), integers
         and numbers are now not mishandled anymore by dual-vars, temp. string representations.
         Add t/117_numbers.t from JSON::PP, PR#10 by kraih.
       - Add prompt for nan/inf encode policy: null or stringify.
       - Change stringification of false and true to 0 and 1, matching upstream JSON and JSON::XS, #29.
         This didn't affect string comparisons, just e.g. print decode_json("false").
       - Tolerate literal ASCII TABs in strings in relaxed mode #22 (from JSON::XS)
       - Revise pod, merge updates from JSON::XS.
       - Fix pod typo #30 (Colin Kuskie)

3.0107 2014-11-28 (rurban)
       - fix fatal stack corruption with perl callbacks in list context
         #27 (dur-randir)

3.0106 2014-11-11 (rurban)
       - more minor doc improvements #26 (schwern)

3.0105 2014-11-05 (rurban)
       - minor doc improvements #25 (ether)
       - fix d_Gconvert test in t/11_pc_expo.t for 5.6

3.0104 2014-04-26 (rurban)
       - add t/z_leaktrace.t
       - restore build on C89 (bulk88)
       - fix small cxt->sv_json leak on interp exit (bulk88)

3.0103 2014-04-21 (rurban)
       - Change booleans interop logic (again) for JSON-XS-3.01
         Check now for Types::Serialiser::Boolean ie JSON::PP::Boolean refs (#18 clintongormley)
         to avoid allow_blessed for JSON-XS-3.01 booleans.
       - fix boolean representation for JSON-XS-3.01/Types::Serialiser::Boolean interop
         (arrayref, not hashref)
       - add t/52_object.t from JSON::XS
       - backport encode_hv HE sort on stack < 64 or heap to avoid stack
         overflows from JSON-XS-3.01. do not use alloca.
       - backport allow_tags, decode_tag, FREEZE/THAW callbacks from JSON-XS-3.01
       - added pod for OBJECT SERIALISATION (allow_tags, FREEZE/THAW)

3.0102 2014-04-17 (rurban + bulk88)
       - Added PERL_NO_GET_CONTEXT for better performance on threaded Perls (bulk88)
       - MANIFEST: added t/96_interop.t
       - Document deprecated functions
       - Change booleans interop logic for JSON-XS-3.01

3.0101 2014-04-15 (rurban + bulk88)
       - Added ithreads support (bulk88)
         Cpanel::JSON::XS is now thread-safe.
       - const'ed a translation table for memory savings (bulk88)
       - Fixed booleans for JSON 2.9 and JSON-XS-3.01 interop.
         JSON does not support JSON::XS booleans anymore, so
         I cannot think of any reason to still use JSON::XS.

2.3404 2014-01-30 (rurban)
       - fix interop with JSON::XS booleans
         the internal boolean objects are now blessed into JSON::XS::Boolean
         #13 and [cpan #92548] (samuel.c.kaufman)
       - t/96_interop.t: added
       - LICENSE section to pod added for t/z_kwalitee.t
       - README: fixed some pod spelling errors in (David Steinbrunner)

2.3403 2013-11-02 (cpanel)
       - fix json_atof on AIX without HAS_LONG_DOUBLE (powl in libm)
         [cpan #88061] (Ulisse Monari, Reini Urban)

2.3402 2013-11-02 (cpanel)
       - t/97_unshare_hek.t: fix issue #10, unshare hek assertion resp. valgrind error
       - Rename internal 5.6 methods {from|to}_json_ to _{from|to}_json
       - Fixed get_binary pod
       - Added t/z_*.t maintainer tests

2.3401 2013-10-02 (cpanel)
       - add more binary tests, including 5.6
       - improve POD for binary and cPanel fork
       - Fix homepage META

2.3314 2013-09-09 (cpanel)
       - t/01_utf8.t: workaround for stricter Encode versions (syohex)
       - autogenerate META files

2.3313 2013-06-26 (cpanel)
       - Fix re-blessing of READONLY data (chip) [GH issue #7].
       - Depend on Pod::Usage 1.36. 1.51 was added with 2.3306
       - t/01_utf8.t: workaround for stricter Encode versions [RT #84244]
       - avoid <5.10 const warnings with sv_chop

2.3312 2013-05-22 (cpanel)
       - Made common::sense optional to get smaller FatPacker packages.

2.3311 2013-04-04 18:41:23 (cpanel)
       - Changed maintainer to cpan@cpanel.net
       - Changed tracker to RT
       - Worked on JSON integration (matching prototypes)
       - Fixed Boolean stringify and eq overload methods to match JSON (Fixes JSON tests)

2.3310 2013-03-28 12:20:11 (rurban)
       - add testcases for JSON::XS RT #84244, double-encoding with utf8
         t/01_utf8.t (use utf8), t/14_latin1.t (no utf8)
       - t/01_utf8.t: enable and fix more 5.6 testcases

2.3309 2013-03-28 09:37:29 (rurban)
       - fix 19_incr.t broken with 5.17.10 hash randomization [JSON::XS RT #84151]
         by wyant @ cpan.org

2.3308 2013-03-28 09:10:45 (rurban)
       - fix 5.6 binary utf8 encoding, harmonized with newer perls
         5.6. encodes strings to utf8 internally when seeing a codepoint >= 0x80.
	 with binary decode it to the original bytes before encoding it to escaped JSON.

2.3307 2013-03-27 17:27:18 (rurban)
       - fix lots of -Wincompatible-pointer-types and -Wpointer-sign warnings
       - add binary method
       - write and accept \xNN JSON encoding with binary only,
         also accept octal \0NNN JSON with binary

2.3306 2013-03-27 12:15:20 (rurban)
       - fix decode_utf8 for 5.6 (bdraco)
       - use common::sense for tests
       - fix README dependency: update earlier, not just at make dist
       - added pod2text prereqs

2.3305 2013-03-27 11:47:36 (rurban)
       - nondev version to be indexed in CPAN
       - t/99_binary.t: non-numeric test names, use is instead of ok
       - added META data to Makefile.PL

2.33_04 2013-03-01 15:42:39 (rurban)
	- fix for 5.6 compiler:
	  $json->incr_text may not be called as lvalue,
	  missing attributes::reftype

2.33_03 2013-02-28 17:22:52 (bdraco)
	- revert fix crash with invalid JSON, empty sv 
    
2.33_02 2012-08-17 16:29:52 (rurban)
	- fix crash with invalid JSON, empty sv 

2.33_01 2012-08-08 16:29:52 (rurban)
	- merge with JSON-XS-2.33

2.33 2012-08-01 21:03:52 2012
	- internal encode/decode XS wrappers did not expect stack
          moves caused by callbacks (analyzed and testcase by Jesse Luehrs).
	- add bencode as to/from option in bin/json_xs.
        - add -e option to json_xs, and none and string in/out formats.

2.32_02 2012-06-27 19:59:18 (rurban)
	- forked from JSON-XS-2.32
	- Cpanel perl-5.6.2 support
	- prefix with Cpanel

2.32 2011-08-11 19:06:38
	- fix a bug in the initial whitespace accumulation.

2.31 2011-07-27 17:53:05
	- don't accumulate initial whitespace in the incremental buffer
          (this can be useful to allow whitespace-keepalive on a tcp
          connection without triggering the max_size limit).
	- properly croak on some invalid inputs that are not strings
          (e.g. undef) when trying to decode a json text (reported
          and analyzed by Goro Fuji).

2.3  2010-08-18 01:26:47
	- make sure decoder doesn't change the decoding in the incremental
          parser (testcase provided by Hendrik Schumacher).
	- applied patch by DaTa for Data::Dumper support in json_xs.
        - added -t dump support to json_xs, using Data::Dump.
        - added -f eval support to json_xs.

2.29  2010-03-17 02:39:12
	- fix a memory leak when callbacks set using filter_json_object
          or filter_json_single_key_object were called (great testcase
          by Eric Wilhelm).

2.28  2010-03-11 20:30:46
	- implement our own atof function - perl's can be orders of
          magnitudes slower than even the system one. on the positive
          side, ours seems to be more exact in general than perl's.
          (testcase provided by Tim Meadowcroft).
        - clarify floating point conversion issues a bit.
	- update jpsykes csrf article url.
        - updated benchmark section - JSON::PP became much faster!

2.27  2010-01-07 07:35:08
	- support relaxed option inside the incremental parser
          (testcase provided by IKEGAMI via Makamaka).

2.26  2009-10-10 03:26:19
	- big integers could become truncated (based on patch
          by Strobl Anton).
	- output format change: indent now adds a final newline, which is
          more expected and more true to the documentation.

2.25  2009-08-08 12:04:41
	- the perl debugger completely breaks lvalue subs - try to work
          around the issue.
	- ignore RMAGICAL hashes w.r.t. CANONICAL.
	- try to work around a possible char signedness issue on aix.
        - require common sense.

2.24  2009-05-30 08:25:45
	- the incremental parser did not update its parse offset
          pointer correctly when parsing utf8-strings (nicely
          debugged by Martin Evans).
	- appending a non-utf8-string to the incremental parser
          in utf8 mode failed to upgrade the string.
        - wording of parse error messages has been improved.

2.232 2009-02-22 11:12:25
	- use an exponential algorithm to extend strings, to
          help platforms with bad or abysmal==windows memory
          allocater performance, at the expense of some memory
          wastage (use shrink to recover this extra memory).
          (nicely analysed by Dmitry Karasik).

2.2311 2009-02-19 02:12:54
        - add a section "JSON and ECMAscript" to explain some
          incompatibilities between the two (problem was noted by
          various people).
	- add t/20_faihu.t.

2.231 2008-11-20 04:59:08
	- work around 5.10.0 magic bugs where manipulating magic values
          (such as $1) would permanently damage them as perl would
          ignore the magicalness, by making a full copy of the string,
          reported by Dmitry Karasik.
        - work around spurious warnings under older perl 5.8's.

2.23 2008-09-29 05:08:29
	- fix a compilation problem when perl is not using char * as, well,
          char *.



( run in 1.138 second using v1.01-cache-2.11-cpan-39bf76dae61 )