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 4:08 AM by JamesNK
no reply


JamesNK wrote May 4, 2012 at 12:25 PM

I can't reproduce. Post an example please.

wrote May 16, 2012 at 4:08 AM

wrote Feb 22, 2013 at 1:48 AM

wrote May 16, 2013 at 12:37 PM