Announcement

Collapse
No announcement yet.

Deserialization is broken with inline field initialization

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

    Deserialization is broken with inline field initialization

    Utilizing the bridge newtonsoft libraries-- It appears that either the newtonsoft library is broken, or potentially something related to the static initialization of the inline field property list add.

    Here is the deck outlining the problem.
    https://deck.net/4411ad460ed77ddc1980d61b0319a5e1
    Last edited by selinc; 2018-11-12 @ 06:17 PM.

    #2
    It looks like this is an issue even in the Newtonsoft .net version:
    https://dotnetfiddle.net/uGCgX1

    Maybe I'm just doing something wrong?

    Comment


      #3
      Hello selinc

      Thanks for the report, but I see the same output with Bridge and native .NET. Unless I entered the code incorrectly in this fiddle: https://dotnetfiddle.net/dhB4Yz

      I also got the same output in a native .NET application. Both .net fiddle and the native .NET applications using the native implementation of Newtonsoft.Json.

      Comment


        #4
        Seem you responded while I was verifying your thread. I'm not really sure what you expected from that code, but if Bridge mimics the behavior from its native implementation I guess that's exactly the goal.

        Comment


          #5
          Yes, it looks like its a bug in the .net implementation (I don't see how this could be desired).
          The expected result was to deserialize the string. Using list values of the default constructed objects seems wrong since the list was specified in the JSON. But again, its not bridge's problem.

          Thanks.

          Comment

          Working...
          X