Activity

Are you asking for these methods to be included in the API methods along with ExecuteStore, ExecuteGet, etc? Extension methods technically aren't API methods and aren't part of the ICouchbaseClient interface.

John Zablocki (Inactive)
added a comment - 15/Jan/13 8:40 AM Are you asking for these methods to be included in the API methods along with ExecuteStore, ExecuteGet, etc? Extension methods technically aren't API methods and aren't part of the ICouchbaseClient interface.

Yes, that was what I was asking for. I'm not sure I understand why there are so many different methods for store/get, but since we are recommending customers to store their data as JSON I would assume that these are "first class citizens" and should be documented along with the other methods we support...no?

Perry Krug
added a comment - 15/Jan/13 8:46 AM Yes, that was what I was asking for. I'm not sure I understand why there are so many different methods for store/get, but since we are recommending customers to store their data as JSON I would assume that these are "first class citizens" and should be documented along with the other methods we support...no?

The JSON extension methods are "opinionated" in that they force you to use JSON.NET for serialization and the default serializer settings that I've included. I don't know that we should recommend these extensions as the "best" option, but rather "an" option. If a user is content to rely on these basic methods, then they would be sufficient. However, there are many users who will prefer other JSON serializers or other class-to-document mapping rules. So rather than attempt to address all JSON concerns with the API, these are convenience methods, which is why they're extension methods. Extension methods in .NET allow a user to treat method like a class method, even though it's not defined in an object's interface.

John Zablocki (Inactive)
added a comment - 15/Jan/13 8:55 AM The JSON extension methods are "opinionated" in that they force you to use JSON.NET for serialization and the default serializer settings that I've included. I don't know that we should recommend these extensions as the "best" option, but rather "an" option. If a user is content to rely on these basic methods, then they would be sufficient. However, there are many users who will prefer other JSON serializers or other class-to-document mapping rules. So rather than attempt to address all JSON concerns with the API, these are convenience methods, which is why they're extension methods. Extension methods in .NET allow a user to treat method like a class method, even though it's not defined in an object's interface.

John Zablocki (Inactive)
added a comment - 15/Jan/13 10:17 AM I think that's reasonable. When I update the jsonextensions.html page, I'll try to add "Here's what to do if you don't want to use JSON extensions..."