From 0124187e3a7c3aa93ee74e19bdb528160673b95c Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Mon, 23 Mar 2015 13:52:53 -0400 Subject: [PATCH] FIX: Ning json files sometimes have an extra ] at the end --- script/import_scripts/ning.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/script/import_scripts/ning.rb b/script/import_scripts/ning.rb index 138776875..d5a81944b 100644 --- a/script/import_scripts/ning.rb +++ b/script/import_scripts/ning.rb @@ -55,6 +55,8 @@ class ImportScripts::Ning < ImportScripts::Base arg.gsub!(/^\(/, "") # content of file is surround by ( ) arg.gsub!(/\)$/, "") + arg.gsub!(/\]\]$/, "]") # there can be an extra ] at the end + arg.gsub!(/\}\{/, "},{") # missing commas sometimes! arg.gsub!("}]{", "},{") # surprise square brackets