Browse Source

Allow trailing commas in JSON

1vanK 8 years ago
parent
commit
16412186e0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/Urho3D/Resource/JSONFile.cpp

+ 1 - 1
Source/Urho3D/Resource/JSONFile.cpp

@@ -128,7 +128,7 @@ bool JSONFile::BeginLoad(Deserializer& source)
     buffer[dataSize] = '\0';
     buffer[dataSize] = '\0';
 
 
     rapidjson::Document document;
     rapidjson::Document document;
-    if (document.Parse<kParseCommentsFlag>(buffer).HasParseError())
+    if (document.Parse<kParseCommentsFlag | kParseTrailingCommasFlag>(buffer).HasParseError())
     {
     {
         URHO3D_LOGERROR("Could not parse JSON data from " + source.GetName());
         URHO3D_LOGERROR("Could not parse JSON data from " + source.GetName());
         return false;
         return false;