lib: add printbuf.h API from json

This API proposes to use the sprintbuf() method to facilitate
the forge of buffers in json.

Note that this buffer is limited to 128 bytes, so it can not
be used everywhere as it without any checks.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
Philippe Guibert 2024-09-12 13:40:01 +02:00
parent 2dd79c0d24
commit de17bbb188

View file

@ -13,6 +13,7 @@ extern "C" {
#include "command.h"
#include "printfrr.h"
#include <json-c/json.h>
#include <json-c/printbuf.h>
/*
* FRR style JSON iteration.