JSON parser: Improve by using exceptions to get exact error

Also strip redundant "_Parser_" prefix from private methods.
This commit is contained in:
Stephan Aßmus
2014-08-30 23:42:02 +02:00
parent 7f9beaf1f8
commit ffd7c6110b
2 changed files with 102 additions and 44 deletions
+5 -4
View File
@@ -22,10 +22,11 @@ public:
static status_t Parse(BMessage& message, BString& JSON);
private:
static BString _Parser_ParseString(BString& JSON, int32& pos);
static double _Parser_ParseNumber(BString& JSON, int32& pos);
static bool _Parser_ParseConstant(BString& JSON, int32& pos,
const char* constant);
static void _Parse(BMessage& message, BString& JSON);
static BString _ParseString(BString& JSON, int32& pos);
static double _ParseNumber(BString& JSON, int32& pos);
static bool _ParseConstant(BString& JSON, int32& pos,
const char* constant);
};
} // namespace BPrivate