OmitRootObject with empty XML document


Invalid JSON is generated when you try to serialise an empty xml document (not null; XDocument without contents for instance) when OmitRootObject is set to true.
The generated JSON is like this:
{ x: }
Closed May 16, 2012 at 5:08 AM by JamesNK
no reply


JamesNK wrote May 4, 2012 at 1:25 PM

I can't reproduce. Post an example please.

wrote May 16, 2012 at 5:08 AM

wrote Feb 22, 2013 at 2:48 AM

wrote May 16, 2013 at 1:37 PM