|Subject:||Non deterministic result for $..* on scalar value|
|Date:||Tue, 14 Jan 2020 08:31:42 +0100|
|To:||bug-JSON-Path [...] rt.cpan.org|
|From:||Christoph Burgmer <christoph.burgmer [...] gmail.com>|
It seems a recent bump in Alpine 3.11 from 3.10 has changed the Perl version from This is perl 5, version 28, subversion 2 (v5.28.2) to This is perl 5, version 30, subversion 1 (v5.30.1) and also changed the response from JSON::Path for the edge case of $..* run on a document of the number 42 from an error response to the result of an empty array. However on OS X with the same newer Perl version the previous error response can still be seen: $ echo 42 | perl main.pl '$..*' Unable to decode 42 as JSON: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "(end of string)") at build/lib/perl5/JSON/Path/Evaluator.pm line 81, <STDIN> line 1. at build/lib/perl5/JSON/Path/Evaluator.pm line 79. $ perl --version This is perl 5, version 30, subversion 1 (v5.30.1) built for darwin-thread-multi-2level [...] $ uname -s Darwin vs. $ docker run --rm -it -v "$(pwd):/mydir" alpine:3.11 sh / # apk add perl fetchfetch (1/2) Installing libbz2 (1.0.8-r1) (2/2) Installing perl (5.30.1-r0) Executing busybox-1.31.1-r8.trigger OK: 42 MiB in 16 packages / # cd mydir/ /mydir # echo 42 | perl main.pl '$..*'  /mydir # perl --version This is perl 5, version 30, subversion 1 (v5.30.1) built for x86_64-linux-thread-multi [...] This currently makes it hard to reproduce the same results for the json-path-comparison across the Docker and native build (at least on OS X). I would be grateful for any pointers into why the behaviour would be different. Script is here: For completeness, I'm tracking this issue on the other side under .