mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/4] lib: add jsmn JSON parser
@ 2023-01-10  8:49 Ahmad Fatoum
  2023-01-10  8:49 ` [PATCH 1/4] lib: add jsmn JSON parser support Ahmad Fatoum
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2023-01-10  8:49 UTC (permalink / raw)
  To: barebox

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

 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




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-01-10 15:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-10  8:49 [PATCH 0/4] lib: add jsmn JSON parser Ahmad Fatoum
2023-01-10  8:49 ` [PATCH 1/4] lib: add jsmn JSON parser support Ahmad Fatoum
2023-01-10  8:49 ` [PATCH 2/4] lib: extend jsmn with simple JSONPath lookup helpers Ahmad Fatoum
2023-01-10  8:49 ` [PATCH 3/4] vsprintf: implement %pJP for printing JSONPaths Ahmad Fatoum
2023-01-10  8:49 ` [PATCH 4/4] test: self: add json parser test Ahmad Fatoum
2023-01-10 15:10 ` [PATCH 0/4] lib: add jsmn JSON parser Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox