Improved Json methods to correct work with swig and inheritance.

This commit is contained in:
Jonathan Thomas
2013-12-07 21:09:55 -06:00
parent e3d41808b9
commit cd7743fb88
44 changed files with 787 additions and 221 deletions

View File

@@ -183,7 +183,7 @@ Json::Value WriterBase::JsonValue() {
}
// Load JSON string into this object
void WriterBase::Json(string value) throw(InvalidJSON) {
void WriterBase::SetJson(string value) throw(InvalidJSON) {
// Parse JSON string into JSON objects
Json::Value root;
@@ -196,7 +196,7 @@ void WriterBase::Json(string value) throw(InvalidJSON) {
try
{
// Set all values that match
Json(root);
SetJsonValue(root);
}
catch (exception e)
{
@@ -206,7 +206,7 @@ void WriterBase::Json(string value) throw(InvalidJSON) {
}
// Load Json::JsonValue into this object
void WriterBase::Json(Json::Value root) {
void WriterBase::SetJsonValue(Json::Value root) {
// Set data from Json (if key is found)
if (root["has_video"] != Json::nullValue)