Important Update:

- JSONparseCore:
  - Allow JSON to be parsed from string data
- DataTreeCore:
  - Allow GetMember to work with now path, ie. return BaseMember param
This commit is contained in:
Charl Wentzel
2018-10-28 22:36:31 +00:00
parent 22a05ebd4e
commit 12a8ddb7ba
3 changed files with 30 additions and 4 deletions

View File

@@ -254,6 +254,29 @@ bool CJSONparse::ReadFromHandle( const char * BasePath, int Handle, bool pRefill
}
//---------------------------------------------------------------------------
bool CJSONparse::ReadFromString( const char * BasePath, const char * InString, const int Len )
{
bool result = false;
// Clear Error
Error = false;
// Load Buffer
CreateBuffer( Len );
Buffer->Push( true, InString, Len );
// Continuously refill buffer while loading
result = ReadFromBuffer( BasePath );
RefillBuffer = false;
// Destroy buffer
FreeBuffer();
InputHandle = -1;
return result;
}
//---------------------------------------------------------------------------
bool CJSONparse::ReadFromBuffer( const char * BasePath )
{
TDataMember * BaseMember = NULL;