Convert Class Object to JSON string?

Q

quantass

Im using C#, ASP.NET v1.1. My class contains intrinsic types,
ArrayList, and XmlDocument types. Some variables have the value NULL.

After usng XmlSerializer and the information on:
http://www.phdcc.com/xml2json.htm I'm having issue fully converitng my
class object to a javascript readable string.

The XmlSerializer appears to ignore all variables containing NULL and
so the final JSON output is incomplete. Also I have a DateTime object
within my class. The converted date is horrible, certainly not even
close to what Javascript can parse. Is there a way to set the datetime
format.

Is there anything i can do to resolve this or a better tool for
converting my class object to JSON string?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top