mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 03:18:23 +00:00
FIX: Ning json can have square brackets instead of commas
This commit is contained in:
parent
9584990477
commit
ef482591bf
@ -51,7 +51,12 @@ class ImportScripts::Ning < ImportScripts::Base
|
||||
def repair_json(arg)
|
||||
arg.gsub!(/^\(/, "") # content of file is surround by ( )
|
||||
arg.gsub!(/\)$/, "")
|
||||
|
||||
arg.gsub!(/\}\{/, "},{") # missing commas sometimes!
|
||||
|
||||
arg.gsub!("}]{", "},{") # surprise square brackets
|
||||
arg.gsub!("}[{", "},{") # :troll:
|
||||
|
||||
arg
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user