Register global JsonConverter (.NET)?

40 views
Skip to first unread message

Dylan Wilson

unread,
Aug 7, 2015, 1:07:46 PM8/7/15
to Couchbase Mobile


I would like to use a 3rd party library with its own JSON serialization to handle certain bits of my object models.  The JSON.Net JsonConverter attribute works, but I don't have a clean way to add it.  I was able to add my converter into the  JsonSerializerSettings  in  Couchbase.Lite.NewtonsoftJsonSerializer  but I suspect folks don't want to allow the class and property to be made public so clients can see/access it.  Looking for alternatives on the approach that would work and meet the design goals of the library.

Thanks,
Dylan

Jim Borden

unread,
Aug 16, 2015, 11:28:39 AM8/16/15
to Couchbase Mobile
What you are seeing with the NewtonsoftJsonSerializer class is the beginning of making the JSON serialization library swappable.  At some point in the future, you will be able to define your own serialization engine and set it.  You can feel free to create a ticket on the github repo if you want to track the status of this.
Reply all
Reply to author
Forward
0 new messages