diff --git a/ln.json/JSONNumber.cs b/ln.json/JSONNumber.cs
index e179b78..6e5d3fa 100644
--- a/ln.json/JSONNumber.cs
+++ b/ln.json/JSONNumber.cs
@@ -64,5 +64,14 @@ namespace ln.json
{
return decValue.ToString(CultureInfo.InvariantCulture);
}
+
+
+ public static implicit operator Decimal(JSONNumber j) => j.decValue;
+ public static implicit operator float(JSONNumber j) => (float)j.decValue;
+ public static implicit operator double(JSONNumber j) => (double)j.decValue;
+ public static implicit operator int(JSONNumber j) => (int)j.decValue;
+ public static implicit operator long(JSONNumber j) => (long)j.decValue;
+ public static implicit operator uint(JSONNumber j) => (uint)j.decValue;
+ public static implicit operator ulong(JSONNumber j) => (ulong)j.decValue;
}
}
diff --git a/ln.json/JSONString.cs b/ln.json/JSONString.cs
index cacadda..8918cae 100644
--- a/ln.json/JSONString.cs
+++ b/ln.json/JSONString.cs
@@ -97,5 +97,7 @@ namespace ln.json
}
return sb.ToString();
}
+
+ public static implicit operator String(JSONString j) => j.Value;
}
}
diff --git a/ln.json/ln.json.csproj b/ln.json/ln.json.csproj
index a8eda89..a1531c5 100644
--- a/ln.json/ln.json.csproj
+++ b/ln.json/ln.json.csproj
@@ -9,7 +9,7 @@
true
0.1.0.0
0.1.0.0
- 1.3.0-preview2
+ 1.3.0-preview3
net7.0