Exemplo n.º 1
0
        public void Serialize <T>(TextWriter writer, Format format, T item)
        {
            var text = JsonConvert.SerializeObject(item, FormatConverter.Convert(format)
                                                   , new JsonSerializerSettings()
            {
                ReferenceLoopHandling = ReferenceLoopHandling.Ignore
            }
                                                   );

            writer.Write(text);
        }
Exemplo n.º 2
0
        public void Serialize <T>(TextWriter writer, Format format, T item)
        {
            var text = JsonConvert.SerializeObject(item, FormatConverter.Convert(format));

            writer.Write(text);
        }