From a37692cce477a58913a7ad7b55a731c4251732c7 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Sat, 25 Aug 2018 21:33:53 -0500 Subject: [PATCH] Fix 'to_json' for comment array --- src/invidious/users.cr | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/invidious/users.cr b/src/invidious/users.cr index f8974693..7ffd5400 100644 --- a/src/invidious/users.cr +++ b/src/invidious/users.cr @@ -45,7 +45,11 @@ DEFAULT_USER_PREFERENCES = Preferences.from_json({ class Preferences module StringToArray def self.to_json(value : Array(String), json : JSON::Builder) - return value.to_json + json.array do + value.each do |element| + json.string element + end + end end def self.from_json(value : JSON::PullParser) : Array(String)