{"comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/7eacf8a1b8d39de3598a2e54d14d2b05?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"7eacf8a1b8d39de3598a2e54d14d2b05","url":"https://api.github.com/users/asgerhallas","login":"asgerhallas","id":299575},"position":null,"updated_at":"2011-11-14T17:57:37Z","commit_id":"da385ae513a328e34ca1e9640119000b82662786","url":"https://api.github.com/repos/ayende/ravendb/comments/719530","line":null,"body":"Now just to be clear, I didn't write those tests :)\r\nI went through every direct usage of the serializer as described above, and I could find anywhere the Uri bug could affect Raven. \r\nYou don't seem to be serializing any Uri objects internally - and if they come in from the user, they are handled as strings in RavenJValue.\r\n\r\n//Asger\r\n\r\n-----Oprindelig meddelelse-----\r\nFra: Ayende Rahien [mailto:reply@reply.github.com] \r\nSendt: 14. november 2011 17:46\r\nTil: asgerhallas\r\nEmne: Re: [ravendb] Using the 4.0.3 json on nuget (da385ae)\r\n\r\nUI checked your tests, and your:\r\nJsonUri.can_serialize_uris_correctly is not a valid test, we don't support\r\nserializing of values, only of entities.\r\nJsonNetBugsTests.can_serialize_object_whth_byte_array_when_TypeNameHandling_is_All\r\nis fixed\r\n\r\nJsonNetBugsTests.can_serialize_object_is_collection - You can't serialize\r\nobjects that implements IEnumerable directly\r\nJsonNetBugsTests.can_Serialize_object_with_private_field - we don't\r\nserialize private fields by default, you can use a different contract\r\nresolver that does that, though.\r\n store.Conventions.JsonContractResolver = new DefaultContractResolver(true)\r\n{\r\n DefaultMembersSearchFlags =\r\nBindingFlags.NonPublic|BindingFlags.Public|BindingFlags.Instance\r\n};\r\n\r\nThe concurrent dictionary one is a bug is Json.NET that I am willing to\r\ntolerate, since entities generally don't have concurrent dictionaries in\r\nthem, and you can work around that using a converter.\r\n\r\nOn Sun, Nov 13, 2011 at 10:50 AM, asgerhallas <\r\nreply@reply.github.com\r\n> wrote:\r\n\r\n> The bug should only be a problem where where either\r\n> JsonConvert.SerializeObject() is used directly or where\r\n> JsonSerializer.Serialize() is used with a JsonTextWriter().\r\n>\r\n> It seems that all usage with externally defined objects are using\r\n> RavenJToken.WriteTo/RavenJTokenWriter where Uris are written as strings,\r\n> circumventing the bug. And all other places are serializing internal\r\n> objects (indexes, requests, http errors and the like), that does not have\r\n> any Uris in them.\r\n>\r\n> ---\r\n> Reply to this email directly or view it on GitHub:\r\n>\r\n> https://github.com/ayende/ravendb/commit/da385ae513a328e34ca1e9640119000b82662786#commitcomment-714088\r\n>\r\n\r\n--- \r\nReply to this email directly or view it on GitHub:\r\nhttps://github.com/ayende/ravendb/commit/da385ae513a328e34ca1e9640119000b82662786#commitcomment-719331\r\n\r\n","html_url":"https://github.com/ayende/ravendb/commit/da385ae513#commitcomment-719530","id":719530,"path":null,"created_at":"2011-11-14T17:57:37Z"}}