1 //-----------------------------------------------------------------------------
2 // Copyright (C) 2018 Merlok
4 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
5 // at your option, any later version. See the LICENSE.txt file for the text of
7 //-----------------------------------------------------------------------------
9 //-----------------------------------------------------------------------------
16 #include "jansson_path.h"
24 const char *GetApplicationDataName(tlv_tag_t tag
);
26 int JsonSaveJsonObject(json_t
*root
, const char *path
, json_t
*value
);
27 int JsonSaveStr(json_t
*root
, const char *path
, const char *value
);
28 int JsonSaveBoolean(json_t
*root
, const char *path
, bool value
);
29 int JsonSaveInt(json_t
*root
, const char *path
, int value
);
30 int JsonSaveBufAsHexCompact(json_t
*elm
, const char *path
, uint8_t *data
, size_t datalen
);
31 int JsonSaveBufAsHex(json_t
*elm
, const char *path
, uint8_t *data
, size_t datalen
);
32 int JsonSaveHex(json_t
*elm
, const char *path
, uint64_t data
, int datalen
);
34 int JsonSaveTLVValue(json_t
*root
, const char *path
, struct tlvdb
*tlvdbelm
);
35 int JsonSaveTLVElm(json_t
*elm
, const char *path
, struct tlv
*tlvelm
, bool saveName
, bool saveValue
, bool saveAppDataLink
);
36 int JsonSaveTLVTreeElm(json_t
*elm
, const char *path
, struct tlvdb
*tlvdbelm
, bool saveName
, bool saveValue
, bool saveAppDataLink
);
38 int JsonSaveTLVTree(json_t
*root
, json_t
*elm
, const char *path
, struct tlvdb
*tlvdbelm
);
40 int JsonLoadStr(json_t
*root
, const char *path
, char *value
);
41 int JsonLoadBufAsHex(json_t
*elm
, const char *path
, uint8_t *data
, size_t maxbufferlen
, size_t *datalen
);
43 bool ParamLoadFromJson(struct tlvdb
*tlv
);