diff --git a/ln.json.sln b/ln.json.sln new file mode 100644 index 0000000..73eaeb5 --- /dev/null +++ b/ln.json.sln @@ -0,0 +1,48 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26124.0 +MinimumVisualStudioVersion = 15.0.26124.0 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ln.json", "ln.json\ln.json.csproj", "{E756C797-C72B-45C0-8DB2-3594CE3C00A6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ln.json.tests", "ln.json.tests\ln.json.tests.csproj", "{0F450BF8-225C-4230-AF01-0E628A00E986}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E756C797-C72B-45C0-8DB2-3594CE3C00A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E756C797-C72B-45C0-8DB2-3594CE3C00A6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E756C797-C72B-45C0-8DB2-3594CE3C00A6}.Debug|x64.ActiveCfg = Debug|Any CPU + {E756C797-C72B-45C0-8DB2-3594CE3C00A6}.Debug|x64.Build.0 = Debug|Any CPU + {E756C797-C72B-45C0-8DB2-3594CE3C00A6}.Debug|x86.ActiveCfg = Debug|Any CPU + {E756C797-C72B-45C0-8DB2-3594CE3C00A6}.Debug|x86.Build.0 = Debug|Any CPU + {E756C797-C72B-45C0-8DB2-3594CE3C00A6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E756C797-C72B-45C0-8DB2-3594CE3C00A6}.Release|Any CPU.Build.0 = Release|Any CPU + {E756C797-C72B-45C0-8DB2-3594CE3C00A6}.Release|x64.ActiveCfg = Release|Any CPU + {E756C797-C72B-45C0-8DB2-3594CE3C00A6}.Release|x64.Build.0 = Release|Any CPU + {E756C797-C72B-45C0-8DB2-3594CE3C00A6}.Release|x86.ActiveCfg = Release|Any CPU + {E756C797-C72B-45C0-8DB2-3594CE3C00A6}.Release|x86.Build.0 = Release|Any CPU + {0F450BF8-225C-4230-AF01-0E628A00E986}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0F450BF8-225C-4230-AF01-0E628A00E986}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0F450BF8-225C-4230-AF01-0E628A00E986}.Debug|x64.ActiveCfg = Debug|Any CPU + {0F450BF8-225C-4230-AF01-0E628A00E986}.Debug|x64.Build.0 = Debug|Any CPU + {0F450BF8-225C-4230-AF01-0E628A00E986}.Debug|x86.ActiveCfg = Debug|Any CPU + {0F450BF8-225C-4230-AF01-0E628A00E986}.Debug|x86.Build.0 = Debug|Any CPU + {0F450BF8-225C-4230-AF01-0E628A00E986}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0F450BF8-225C-4230-AF01-0E628A00E986}.Release|Any CPU.Build.0 = Release|Any CPU + {0F450BF8-225C-4230-AF01-0E628A00E986}.Release|x64.ActiveCfg = Release|Any CPU + {0F450BF8-225C-4230-AF01-0E628A00E986}.Release|x64.Build.0 = Release|Any CPU + {0F450BF8-225C-4230-AF01-0E628A00E986}.Release|x86.ActiveCfg = Release|Any CPU + {0F450BF8-225C-4230-AF01-0E628A00E986}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/ln.json.tests/JSONTests.cs b/ln.json.tests/JSONTests.cs new file mode 100644 index 0000000..647adf1 --- /dev/null +++ b/ln.json.tests/JSONTests.cs @@ -0,0 +1,29 @@ +using NUnit.Framework; + +namespace ln.json.tests +{ + public class JSONTests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Test_00_Primitives() + { + JSONValue jsonFloat = JSONParser.Parse("1234.564"); + + Assert.IsTrue(jsonFloat is JSONNumber); + Assert.AreEqual(1234.564, jsonFloat.ToNative()); + + JSONValue jsonInteger = JSONParser.Parse("635462"); + + Assert.IsTrue(jsonFloat is JSONNumber); + Assert.AreEqual(635462, jsonInteger.ToNative()); + + + Assert.Pass(); + } + } +} \ No newline at end of file diff --git a/ln.json.tests/ln.json.tests.csproj b/ln.json.tests/ln.json.tests.csproj new file mode 100644 index 0000000..60a908e --- /dev/null +++ b/ln.json.tests/ln.json.tests.csproj @@ -0,0 +1,19 @@ + + + + netcoreapp3.1 + + false + + + + + + + + + + + + + diff --git a/JSONArray.cs b/ln.json/JSONArray.cs similarity index 100% rename from JSONArray.cs rename to ln.json/JSONArray.cs diff --git a/JSONMappedObject.cs b/ln.json/JSONMappedObject.cs similarity index 100% rename from JSONMappedObject.cs rename to ln.json/JSONMappedObject.cs diff --git a/JSONNumber.cs b/ln.json/JSONNumber.cs similarity index 100% rename from JSONNumber.cs rename to ln.json/JSONNumber.cs diff --git a/JSONObject.cs b/ln.json/JSONObject.cs similarity index 100% rename from JSONObject.cs rename to ln.json/JSONObject.cs diff --git a/JSONParser.cs b/ln.json/JSONParser.cs similarity index 100% rename from JSONParser.cs rename to ln.json/JSONParser.cs diff --git a/JSONSpecial.cs b/ln.json/JSONSpecial.cs similarity index 100% rename from JSONSpecial.cs rename to ln.json/JSONSpecial.cs diff --git a/JSONString.cs b/ln.json/JSONString.cs similarity index 100% rename from JSONString.cs rename to ln.json/JSONString.cs diff --git a/JSONTypes.cs b/ln.json/JSONTypes.cs similarity index 100% rename from JSONTypes.cs rename to ln.json/JSONTypes.cs diff --git a/JSONValue.cs b/ln.json/JSONValue.cs similarity index 100% rename from JSONValue.cs rename to ln.json/JSONValue.cs diff --git a/attributes/JSONMappingAttribute.cs b/ln.json/attributes/JSONMappingAttribute.cs similarity index 100% rename from attributes/JSONMappingAttribute.cs rename to ln.json/attributes/JSONMappingAttribute.cs diff --git a/ln.json.csproj b/ln.json/ln.json.csproj similarity index 76% rename from ln.json.csproj rename to ln.json/ln.json.csproj index ca1d7bb..01433a1 100644 --- a/ln.json.csproj +++ b/ln.json/ln.json.csproj @@ -12,12 +12,9 @@ 0.1.0.0 - - - - - + + diff --git a/mapping/JSONArrayMapping.cs b/ln.json/mapping/JSONArrayMapping.cs similarity index 100% rename from mapping/JSONArrayMapping.cs rename to ln.json/mapping/JSONArrayMapping.cs diff --git a/mapping/JSONByteArrayMapping.cs b/ln.json/mapping/JSONByteArrayMapping.cs similarity index 100% rename from mapping/JSONByteArrayMapping.cs rename to ln.json/mapping/JSONByteArrayMapping.cs diff --git a/mapping/JSONDateTimeMapping.cs b/ln.json/mapping/JSONDateTimeMapping.cs similarity index 100% rename from mapping/JSONDateTimeMapping.cs rename to ln.json/mapping/JSONDateTimeMapping.cs diff --git a/mapping/JSONDateTimeOffsetMapping.cs b/ln.json/mapping/JSONDateTimeOffsetMapping.cs similarity index 100% rename from mapping/JSONDateTimeOffsetMapping.cs rename to ln.json/mapping/JSONDateTimeOffsetMapping.cs diff --git a/mapping/JSONDictionaryMapping.cs b/ln.json/mapping/JSONDictionaryMapping.cs similarity index 100% rename from mapping/JSONDictionaryMapping.cs rename to ln.json/mapping/JSONDictionaryMapping.cs diff --git a/mapping/JSONEnumMapping.cs b/ln.json/mapping/JSONEnumMapping.cs similarity index 100% rename from mapping/JSONEnumMapping.cs rename to ln.json/mapping/JSONEnumMapping.cs diff --git a/mapping/JSONEnumerableMapping.cs b/ln.json/mapping/JSONEnumerableMapping.cs similarity index 100% rename from mapping/JSONEnumerableMapping.cs rename to ln.json/mapping/JSONEnumerableMapping.cs diff --git a/mapping/JSONExceptionMapping.cs b/ln.json/mapping/JSONExceptionMapping.cs similarity index 100% rename from mapping/JSONExceptionMapping.cs rename to ln.json/mapping/JSONExceptionMapping.cs diff --git a/mapping/JSONGuidMapping.cs b/ln.json/mapping/JSONGuidMapping.cs similarity index 100% rename from mapping/JSONGuidMapping.cs rename to ln.json/mapping/JSONGuidMapping.cs diff --git a/mapping/JSONIPv6Mapping.cs b/ln.json/mapping/JSONIPv6Mapping.cs similarity index 100% rename from mapping/JSONIPv6Mapping.cs rename to ln.json/mapping/JSONIPv6Mapping.cs diff --git a/mapping/JSONMapper.cs b/ln.json/mapping/JSONMapper.cs similarity index 100% rename from mapping/JSONMapper.cs rename to ln.json/mapping/JSONMapper.cs diff --git a/mapping/JSONMapping.cs b/ln.json/mapping/JSONMapping.cs similarity index 100% rename from mapping/JSONMapping.cs rename to ln.json/mapping/JSONMapping.cs diff --git a/mapping/JSONObjectMapping.cs b/ln.json/mapping/JSONObjectMapping.cs similarity index 100% rename from mapping/JSONObjectMapping.cs rename to ln.json/mapping/JSONObjectMapping.cs diff --git a/mapping/JSONRPCCallMapping.cs b/ln.json/mapping/JSONRPCCallMapping.cs similarity index 100% rename from mapping/JSONRPCCallMapping.cs rename to ln.json/mapping/JSONRPCCallMapping.cs diff --git a/mapping/JSONRPCResultMapping.cs b/ln.json/mapping/JSONRPCResultMapping.cs similarity index 100% rename from mapping/JSONRPCResultMapping.cs rename to ln.json/mapping/JSONRPCResultMapping.cs diff --git a/mapping/JSONTimeSpanMapping.cs b/ln.json/mapping/JSONTimeSpanMapping.cs similarity index 100% rename from mapping/JSONTimeSpanMapping.cs rename to ln.json/mapping/JSONTimeSpanMapping.cs