[PATCH 0/4] lib: add jsmn JSON parser

Sascha Hauer sha at pengutronix.de
Tue Jan 10 07:10:58 PST 2023


On Tue, Jan 10, 2023 at 09:49:26AM +0100, Ahmad Fatoum wrote:
> Board code I have needs to read out factory data encoded into JSON blob
> on EEPROM. Import JSMN, a minimal JSON parser written in C.
> 
> I don't know if the board code will be upstreamed in future, but for
> now, add a selftest that exercises the API. As JSON could be useful
> elsewhere as well, I think it's good to have it in-tree.
> 
> Ahmad Fatoum (4):
>   lib: add jsmn JSON parser support
>   lib: extend jsmn with simple JSONPath lookup helpers
>   vsprintf: implement %pJP for printing JSONPaths
>   test: self: add json parser test

Applied, thanks

Sascha

> 
>  include/bselftest.h |   3 +-
>  include/jsmn.h      | 148 ++++++++++++++
>  lib/Kconfig         |   5 +
>  lib/Makefile        |   1 +
>  lib/jsmn.c          | 457 ++++++++++++++++++++++++++++++++++++++++++++
>  lib/vsprintf.c      |  44 +++++
>  test/self/Kconfig   |   5 +
>  test/self/Makefile  |   1 +
>  test/self/json.c    | 146 ++++++++++++++
>  test/self/printf.c  |  17 ++
>  10 files changed, 826 insertions(+), 1 deletion(-)
>  create mode 100644 include/jsmn.h
>  create mode 100644 lib/jsmn.c
>  create mode 100644 test/self/json.c
> 
> -- 
> 2.30.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list