private DynamicJsonSerializer(bool encrypt, JsonMappings mappings) { _jsonObjectSerializer = new JsonObjectSerializer(this); _jsonArraySerializer = new JsonArraySerializer(this); _encrypt = encrypt; _mappings = mappings; }
private DynamicJsonSerializer(bool encrypt, JsonMappings mappings, bool shouldUseAttributeDefinedInInterface) { _jsonObjectSerializer = new JsonObjectSerializer(this); _jsonArraySerializer = new JsonArraySerializer(this); _encrypt = encrypt; _mappings = mappings; _shouldUseAttributeDefinedInInterface = shouldUseAttributeDefinedInInterface; }
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); }