1 //-----------------------------------------------------------------------------
2 // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // See LICENSE.txt for the text of the license.
15 //-----------------------------------------------------------------------------
17 //-----------------------------------------------------------------------------
24 #include "jansson_path.h"
30 } ApplicationDataElm_t
;
32 const char *GetApplicationDataName(tlv_tag_t tag
);
34 int JsonSaveJsonObject(json_t
*root
, const char *path
, json_t
*value
);
35 int JsonSaveStr(json_t
*root
, const char *path
, const char *value
);
36 int JsonSaveBoolean(json_t
*root
, const char *path
, bool value
);
37 int JsonSaveInt(json_t
*root
, const char *path
, int value
);
38 int JsonSaveBufAsHexCompact(json_t
*elm
, const char *path
, uint8_t *data
, size_t datalen
);
39 int JsonSaveBufAsHex(json_t
*elm
, const char *path
, uint8_t *data
, size_t datalen
);
40 int JsonSaveHex(json_t
*elm
, const char *path
, uint64_t data
, int datalen
);
42 int JsonSaveTLVValue(json_t
*root
, const char *path
, struct tlvdb
*tlvdbelm
);
43 int JsonSaveTLVElm(json_t
*elm
, const char *path
, struct tlv
*tlvelm
, bool saveName
, bool saveValue
, bool saveAppDataLink
);
44 int JsonSaveTLVTreeElm(json_t
*elm
, const char *path
, struct tlvdb
*tlvdbelm
, bool saveName
, bool saveValue
, bool saveAppDataLink
);
46 int JsonSaveTLVTree(json_t
*root
, json_t
*elm
, const char *path
, struct tlvdb
*tlvdbelm
);
48 int JsonLoadStr(json_t
*root
, const char *path
, char *value
);
49 int JsonLoadBufAsHex(json_t
*elm
, const char *path
, uint8_t *data
, size_t maxbufferlen
, size_t *datalen
);
51 bool ParamLoadFromJson(struct tlvdb
*tlv
);