ayende/ravendb — comment on commit da385ae513a328e34ca1e9640119000b82662786
File:  line 0
By asgerhallas:

Now just to be clear, I didn't write those tests :)
I went through every direct usage of the serializer as described above, and I could find anywhere the Uri bug could affect Raven.
You 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.

//Asger

-----Oprindelig meddelelse-----
Fra: Ayende Rahien [mailto:reply@reply.github.com]
Sendt: 14. november 2011 17:46
Til: asgerhallas
Emne: Re: [ravendb] Using the 4.0.3 json on nuget (da385ae)

UI checked your tests, and your:
JsonUri.can_serialize_uris_correctly is not a valid test, we don't support
serializing of values, only of entities.
JsonNetBugsTests.can_serialize_object_whth_byte_array_when_TypeNameHandling_is_All
is fixed

JsonNetBugsTests.can_serialize_object_is_collection - You can't serialize
objects that implements IEnumerable directly
JsonNetBugsTests.can_Serialize_object_with_private_field - we don't
serialize private fields by default, you can use a different contract
resolver that does that, though.
store.Conventions.JsonContractResolver = new DefaultContractResolver(true)
{
DefaultMembersSearchFlags =
BindingFlags.NonPublic|BindingFlags.Public|BindingFlags.Instance
};

The concurrent dictionary one is a bug is Json.NET that I am willing to
tolerate, since entities generally don't have concurrent dictionaries in
them, and you can work around that using a converter.

On Sun, Nov 13, 2011 at 10:50 AM, asgerhallas <
reply@reply.github.com
> wrote:

> The bug should only be a problem where where either
> JsonConvert.SerializeObject() is used directly or where
> JsonSerializer.Serialize() is used with a JsonTextWriter().
>
> It seems that all usage with externally defined objects are using
> RavenJToken.WriteTo/RavenJTokenWriter where Uris are written as strings,
> circumventing the bug. And all other places are serializing internal
> objects (indexes, requests, http errors and the like), that does not have
> any Uris in them.
>
> ---
> Reply to this email directly or view it on GitHub:
>
> https://github.com/ayende/ravendb/commit/da385ae513a328e34ca1e9640119000b82662786#commitcomment-714088
>

---
Reply to this email directly or view it on GitHub:
https://github.com/ayende/ravendb/commit/da385ae513a328e34ca1e9640119000b82662786#commitcomment-719331