コード例 #1
0
        private DynamicJsonSerializer(bool encrypt, JsonMappings mappings)
        {
            _jsonObjectSerializer = new JsonObjectSerializer(this);
            _jsonArraySerializer  = new JsonArraySerializer(this);

            _encrypt  = encrypt;
            _mappings = mappings;
        }
コード例 #2
0
        private DynamicJsonSerializer(bool encrypt, JsonMappings mappings)
        {
            _jsonObjectSerializer = new JsonObjectSerializer(this);
            _jsonArraySerializer = new JsonArraySerializer(this);

            _encrypt = encrypt;
            _mappings = mappings;
        }
コード例 #3
0
        private DynamicJsonSerializer(bool encrypt, JsonMappings mappings, bool shouldUseAttributeDefinedInInterface)
        {
            _jsonObjectSerializer = new JsonObjectSerializer(this);
            _jsonArraySerializer = new JsonArraySerializer(this);

            _encrypt = encrypt;
            _mappings = mappings;
            _shouldUseAttributeDefinedInInterface = shouldUseAttributeDefinedInInterface;
        }
コード例 #4
0
        private DynamicJsonSerializer(bool encrypt, JsonMappings mappings, bool shouldUseAttributeDefinedInInterface)
        {
            _jsonObjectSerializer = new JsonObjectSerializer(this);
            _jsonArraySerializer  = new JsonArraySerializer(this);

            _encrypt  = encrypt;
            _mappings = mappings;
            _shouldUseAttributeDefinedInInterface = shouldUseAttributeDefinedInInterface;
        }
コード例 #5
0
        public void TestJsonArraySerializer()
        {
            var serializer = new JsonArraySerializer();

            var expected = $"[{{\"id\":1,\"name\":\"Doe,\\tJohn\"}},{{\"id\":2,\"name\":\"Doe,\\tJane\"}}]";

            var output = serializer.Serialize(data);

            Assert.IsNotNull(output);
            Assert.AreEqual(expected, output);
        }