Announcement

Collapse
No announcement yet.

[CLOSED] [JSON #2] [1.0] [Reflectable] check not applied to base classes

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    [CLOSED] [JSON #2] [1.0] [Reflectable] check not applied to base classes

    If I have a class X from an assembly that does not emit metadata for reflection and I have a class Y that is derived from X but is from an assembly that does emit metadata, if I try to JsonConvert.SerialiseObject an instance of X then it fails as I would expect ("is not reflectable and cannot be serialized") but serialising Y doesn't generate an error at runtime (which I would expect it to do because its base class X is not serialisable) - it just doesn't include any of the data from X in the generated JSON.

    This seems wrong. If I try to serialise a reflectable type that has a base class that is not reflectable then I think that I should get a runtime error, rather than a partially-populated JSON string.

    #2
    Hi,

    Git issue is created
    https://github.com/bridgedotnet/Brid....Json/issues/2

    Comment


      #3
      This issue has been fixed. Pull request has been submitted and is awaiting further review and testing before merging into the master branch.

      Comment


        #4
        Fix for issue #2 merged into Bridge.Newtonsoft.Json repo's master branch and will be included in the next Bridge.NET release.

        Comment

        Working...
        X