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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user