From 9d4c2c170df13aa2178113764c12b25d3b459f56 Mon Sep 17 00:00:00 2001 From: "Valeriano A.R" Date: Sun, 6 Sep 2020 03:45:31 +0200 Subject: [PATCH] JsonParser: Ignore errors while trying to convert to types. --- VAR.Json/JsonParser.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/VAR.Json/JsonParser.cs b/VAR.Json/JsonParser.cs index cebbb47..6aa4d30 100644 --- a/VAR.Json/JsonParser.cs +++ b/VAR.Json/JsonParser.cs @@ -115,7 +115,12 @@ namespace VAR.Json } if (bestMatch != null) { - return ConvertToType(obj, bestMatch); + try + { + object newObj = ConvertToType(obj, bestMatch); + return newObj; + } + catch (Exception) { } /* Nom Nom */ } return obj; }