From b5c718f7ed6db564d6ad979548c98387c4c1e77d Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Wed, 22 Dec 2021 18:48:36 -0500 Subject: [PATCH] string was too restrictive, const char good enough --- jsvar.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jsvar.d b/jsvar.d index c0fdbde..edb56df 100644 --- a/jsvar.d +++ b/jsvar.d @@ -1542,13 +1542,13 @@ struct var { } /// - static var fromJson(string json) { + static var fromJson(const(char)[] json) { auto decoded = parseJSON(json); return var.fromJsonValue(decoded); } /// - static var fromJsonFile(string filename) { + static var fromJsonFile(const(char)[] filename) { import std.file; return var.fromJson(readText(filename)); }