Important update:

- Buffer:
  - fix undefined value: zero terminate buffer when loading from FD
- DataTree:
  - fix memory leak: destroy temporary search path
  - improve delete(): delete all children for member if no path given
  - bug fix: initiate object with 0 length (not -1)
- JSONparse:
  - Remove level parameter
  - Add path to load/save/print methods (print only portion of tree)
  - fix memory leak: destroy temporary object name
This commit is contained in:
Charl Wentzel
2017-03-29 21:27:28 +02:00
parent 5691b22df9
commit 8f39adb0f3
4 changed files with 131 additions and 70 deletions

View File

@@ -36,7 +36,6 @@ private:
char * BufPos;
char * LineMark;
int LineNo;
int Level;
// Printing Operation
char Spacer[100];
@@ -74,10 +73,10 @@ public:
CJSONparse( CDataTree * pDataTree );
~CJSONparse();
bool PrintToScreen( const int Indent );
bool PrintToScreen( const char * Path, const int Indent );
bool LoadFromFile( const char * FilePath, int pBufLen = 500 );
bool SaveToFile( const char * FilePath, const int Indent = 2 );
bool LoadFromFile( const char * Path, const char * FilePath, int pBufLen = 500 );
bool SaveToFile( const char * Path, const char * FilePath, const int Indent = 2 );
const char * GetError() { return ((Error)? ErrorText : "Success"); };
};