JsonSerializationException for type with private constructor
问题 I am persisting NLog logging statements to my RavenDb database. The LogEventInfo class, which represents a log statement, has a property, LogLevel , with a private constructor. Instances of LogLevel (Info, Warn, etc.) are created via static, readonly properties that call the private constructor. The problem is that I wish to read the messages out of the database and querying for them is throwing a Json.Net serialization error: Unable to find a constructor to use for type NLog.LogLevel. A