Example #1
0
        public void StringEncoding(string unescaped)
        {
            var norm     = JsonNormalizer.Normalize(unescaped);
            var expected = "\"a\\\"bc\"";

            Assert.AreEqual(expected, norm);
        }
Example #2
0
        public void Test()
        {
            // - Property ordering
            // - Canonical whitespace
            // - number encoding
            var str1 = JsonNormalizer.Normalize("{ \"A\"     : 12.0, \"B\" \r\n: 34} ");
            var str2 = JsonNormalizer.Normalize("{ \"B\" : 34, \"A\" : 12} ");

            Assert.AreEqual(str1, str2);
        }