PMEMKV_JSON_CONFIG(3)
π PMEMKV_JSON_CONFIG(3) β the PMEMKV Programmer's Manual π
okay bestie, welcome to pmemkv_json_config β it's the helper configuration API for libpmemkv, and it's literally the chillest little library in the whole pmemkv cinematic universe. πΈ
β¨ NAME β¨
pmemkv_json_config β helper configuration API for libpmemkv π«Ά
β¨ SYNOPSIS β¨
#include <libpmemkv_json_config.h>
int pmemkv_config_from_json(pmemkv_config *config, const char *jsonconfig);
const char *pmemkv_config_from_json_errormsg(void);
so like, for the general description of pmemkv and all the available engines, go read libpmemkv(7). For the pmemkv core API, that's libpmemkv(3). And for the configuration API for libpmemkv, that's libpmemkv_config(3). iykyk π
β¨ DESCRIPTION β¨
pmemkv_json_config is a helper library and it provides exactly two functions. two. iconic behavior honestly. π
int pmemkv_config_from_json(pmemkv_config *config, const char *jsonconfig);β parses a JSON string and puts all the items it finds in the JSON intoconfig. π
and here's the type tea, the allowed types in JSON strings and their corresponding types in pmemkv_config:
- number β
int64oruint64 - string β
const char * - object β (another JSON string) -> pointer to
pmemkv_config(you can get it usingpmemkv_config_get_object) True,Falseβint64
const char *pmemkv_config_from_json_errormsg(void);β returns a human readable string describing the last error. no cryptic nonsense, just vibes and answers. π
fr fr, the pmemkv_config_from_json function depends on the RapidJSON library, and that is the direct cause of the creation of this small library. like, that's the whole origin story. π
The building of this library is enabled by default. But bestie, you can disable it by setting the BUILD_JSON_CONFIG CMake variable to OFF:
cmake .. -DBUILD_JSON_CONFIG=OFF
π ERRORS π
The pmemkv_config_from_json() function returns status. Possible return values are:
PMEMKV_STATUS_OKβ no error πPMEMKV_STATUS_UNKNOWN_ERRORβ unknown error πPMEMKV_STATUS_CONFIG_PARSING_ERRORβ parsing config data failed π
β¨ EXAMPLE β¨
An example using this API can be found in libpmemkv_config(3). go look, it's right there, you got this. π¦
β¨ SEE ALSO β¨
libpmemkv(7), libpmemkv(3), libpmemkv_config(3) and <https://pmem.io> π
and that's the whole page, periodt. this one came from the PMEMKV Programmer's Manual, version... okay the footer literally got cut off at PMEMKV - pmemkv_json_config ver... π and it's dated 2022-03-09. consider yourself fully informed, bestie. slay, stay safe, and always read your errormsgs. πβ¨
π¦ where this page comes from
- ubuntu jammy: libpmemkv-dev 1.5.0-4build1 Β· BSD-3
- π the page's license: BSD-3-Clause
- Copyright 2019-2022, Intel Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms