it would be very nice if the json parser could also log\print the line that has error,
some of our json files are over 8000 lines long (and growing), and finding 1 error in there is not too easy to track down always.
It would be nice to have this in Ogre by default (so that we do not need local changes to it just for this).
Would obviously also help others who use Ogre.
Code: Select all
if( d.HasParseError() )
{
OGRE_EXCEPT( Exception::ERR_INVALIDPARAMS,
"HlmsJson::loadMaterials",
"Invalid JSON string in file " + filename );
}
Code: Select all
d.GetErrorOffset() 