<feed xmlns='http://www.w3.org/2005/Atom'>
<title>jsonpath, branch master</title>
<subtitle>JSON parsing utility</subtitle>
<id>https://git.openwrt.org/project/jsonpath/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/jsonpath/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/jsonpath/'/>
<updated>2026-03-15T23:49:06Z</updated>
<entry>
<title>main: fix multiple -e/-t expressions after option deferral</title>
<updated>2026-03-15T23:49:06Z</updated>
<author>
<name>Hauke Mehrtens</name>
</author>
<published>2026-03-15T22:03:15Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/jsonpath/commit/?id=b9034210bd331749673416c6bf389cccd4e23610'/>
<id>urn:sha1:b9034210bd331749673416c6bf389cccd4e23610</id>
<content type='text'>
Commit e5a07f4 introduced deferred filtering but stored only a single
(te_opt, te_source) pair, so each -e/-t option overwrote the previous
one and only the last expression was ever evaluated.

Replace the single pair with VLA arrays sized to argc (an upper bound
on the number of expressions) and process all collected expressions
after parsing.

Fixes: e5a07f468508 ("main: defer processing until options are processed")
Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
Link: https://github.com/openwrt/jsonpath/pull/7
Signed-off-by: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
</content>
</entry>
<entry>
<title>main: fix stdin parsing after option deferral</title>
<updated>2026-03-15T23:48:59Z</updated>
<author>
<name>Hauke Mehrtens</name>
</author>
<published>2026-03-15T22:02:27Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/jsonpath/commit/?id=d67578d6b7f7541ae29d224c8831acbee338ef63'/>
<id>urn:sha1:d67578d6b7f7541ae29d224c8831acbee338ef63</id>
<content type='text'>
Commit e5a07f4 deferred JSON parsing until after all options are
processed, but gated the parse on i_s_flag which is only set by -i
and -s. When reading from stdin (no -i or -s), i_s_flag was never
set, so jsobj stayed NULL and all -e/-t filters returned exit code 1.

Replace i_s_flag with t_e_flag: parse whenever a filter expression
was given, regardless of the input source.

Fixes: https://github.com/openwrt/openwrt/issues/22439
Fixes: e5a07f468508 ("main: defer processing until options are processed")
Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
Link: https://github.com/openwrt/jsonpath/pull/7
Signed-off-by: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
</content>
</entry>
<entry>
<title>main: exit 1 when showing the usage</title>
<updated>2026-03-12T22:32:46Z</updated>
<author>
<name>Alexander Couzens</name>
</author>
<published>2026-02-10T13:08:21Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/jsonpath/commit/?id=e3f6a4160ba2e4806fead60e535e4fba0f8d06be'/>
<id>urn:sha1:e3f6a4160ba2e4806fead60e535e4fba0f8d06be</id>
<content type='text'>
Exit 0 could hide problems in scripts.

Signed-off-by: Alexander Couzens &lt;lynxis@fe80.eu&gt;
</content>
</entry>
<entry>
<title>main: exit 1 on getopt() errors</title>
<updated>2026-03-12T22:32:29Z</updated>
<author>
<name>Alexander Couzens</name>
</author>
<published>2026-02-10T13:06:02Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/jsonpath/commit/?id=b17c31f8a2fd5e788c2a9d3246d6ff1091902360'/>
<id>urn:sha1:b17c31f8a2fd5e788c2a9d3246d6ff1091902360</id>
<content type='text'>
When getopt() encounter an invalid or unknown argument,
it prints an error. However jsonpath ignored those and continued
anyways.
getopt() will print the error message to stderr.

Signed-off-by: Alexander Couzens &lt;lynxis@fe80.eu&gt;
</content>
</entry>
<entry>
<title>lexer: fix a minor memleak in jp_get_token()/match_token()</title>
<updated>2026-03-12T22:32:16Z</updated>
<author>
<name>Alexander Couzens</name>
</author>
<published>2026-02-10T12:42:26Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/jsonpath/commit/?id=e086664e6a570630e8feba889482f174a9a8715e'/>
<id>urn:sha1:e086664e6a570630e8feba889482f174a9a8715e</id>
<content type='text'>
jp_get_token() is using a stack allocated jp_opcode op and
is not using jp_alloc_op() or jp_free().

jp_get_token() is calling match_token() which might assign op-&gt;str
and allocate it via strdup().

Fixes: TOB-OWRT-3
Reported-by: Trail of Bits
Signed-off-by: Alexander Couzens &lt;lynxis@fe80.eu&gt;
</content>
</entry>
<entry>
<title>main: defer processing until options are processed</title>
<updated>2026-02-10T15:23:46Z</updated>
<author>
<name>Paul Donald</name>
</author>
<published>2024-11-30T01:18:47Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/jsonpath/commit/?id=e5a07f468508f5e599723373445d442623ece70d'/>
<id>urn:sha1:e5a07f468508f5e599723373445d442623ece70d</id>
<content type='text'>
fixes load order of -i parameter.

Signed-off-by: Paul Donald &lt;newtwen+github@gmail.com&gt;
</content>
</entry>
<entry>
<title>main: usage spell fixes</title>
<updated>2026-02-10T13:59:14Z</updated>
<author>
<name>Paul Donald</name>
</author>
<published>2024-11-11T14:36:42Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/jsonpath/commit/?id=afe72ad6414e0faedd3d780d9328e514b0083cae'/>
<id>urn:sha1:afe72ad6414e0faedd3d780d9328e514b0083cae</id>
<content type='text'>
Signed-off-by: Paul Donald &lt;newtwen+github@gmail.com&gt;
</content>
</entry>
<entry>
<title>build: require CMake &gt;= 3.10 due to dropped legacy support</title>
<updated>2025-10-04T10:00:27Z</updated>
<author>
<name>Hauke Mehrtens</name>
</author>
<published>2025-10-03T17:32:44Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/jsonpath/commit/?id=f4fe702d0e8d9f8704b42f5d5c10950470ada231'/>
<id>urn:sha1:f4fe702d0e8d9f8704b42f5d5c10950470ada231</id>
<content type='text'>
CMake version 4.0 and later require minimum version of 3.5 or later.
Update to minimum version 3.10 which is the last not deprecated minimum
version.

CMake 3.10 was released in November 2017 and is included in Ubuntu 18.04.

Suggested-by: Hannu Nyman &lt;hannu.nyman@iki.fi&gt;
Signed-off-by: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
</content>
</entry>
<entry>
<title>build: set GNU17 for lemon compilation</title>
<updated>2025-04-18T10:40:12Z</updated>
<author>
<name>Robert Marko</name>
</author>
<published>2025-04-18T10:26:29Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/jsonpath/commit/?id=8a86fb78235b5d7925b762b7b0934517890cc034'/>
<id>urn:sha1:8a86fb78235b5d7925b762b7b0934517890cc034</id>
<content type='text'>
GCC15 has changed the default from GNU17 (Since GCC8) to GNU23 and this is
breaking lemon compilation.

So, simply set -std=gnu17 for lemon.c so it compiles again.

Link: https://github.com/openwrt/jsonpath/pull/4
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>main: fix spurious premature parse aborts in array mode</title>
<updated>2024-01-23T07:55:43Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2024-01-23T07:55:43Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/jsonpath/commit/?id=594cfa86469c005972ba750614f5b3f1af84d0f6'/>
<id>urn:sha1:594cfa86469c005972ba750614f5b3f1af84d0f6</id>
<content type='text'>
When reading newline separated JSON (array mode), continue parsing even
if the JSON tokener signals success, as another object might follow.

Fixes: FS#3683
Fixes: openwrt#8703
Fixes: openwrt#11649
Fixes: openwrt#12344
Fixes: 8614470 ("main: implement array mode")
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
</feed>
