Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-204

JSON extension methods not listed in API references

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.0
    • Fix Version/s: backlog-1.0
    • Component/s: docs
    • Labels:
      None

      Description

      Couldn't find docs around the JSON extension methods listed here:
      https://www.couchbase.com/docs/couchbase-sdk-net-1.2/jsonextensions.html

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        perry Perry Krug added a comment -

        Just as a quick re-open...could we link this from the home page of /develop/net/current as well?

        Show
        perry Perry Krug added a comment - Just as a quick re-open...could we link this from the home page of /develop/net/current as well?
        Show
        john John Zablocki (Inactive) added a comment - http://www.couchbase.com/docs/couchbase-sdk-net-1.2/couchbase-sdk-net-json.html
        Hide
        perry Perry Krug added a comment -

        Thanks John, and will that then link to a piece of our "formal" documentation and API reference?

        Show
        perry Perry Krug added a comment - Thanks John, and will that then link to a piece of our "formal" documentation and API reference?
        Hide
        john John Zablocki (Inactive) added a comment -

        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..."

        Show
        john John Zablocki (Inactive) added a comment - 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..."
        Hide
        perry Perry Krug added a comment -

        Thanks for the clarification John.

        Can we provide guidance or examples on how to use JSON more generically?

        Show
        perry Perry Krug added a comment - Thanks for the clarification John. Can we provide guidance or examples on how to use JSON more generically?
        Hide
        john John Zablocki (Inactive) added a comment -

        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.

        Show
        john John Zablocki (Inactive) added a comment - 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.
        Hide
        perry Perry Krug added a comment -

        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?

        Show
        perry Perry Krug added a comment - 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?
        Hide
        john John Zablocki (Inactive) added a comment -

        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.

        Show
        john John Zablocki (Inactive) added a comment - 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.

          People

          • Assignee:
            jmorris Jeff Morris
            Reporter:
            perry Perry Krug
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Gerrit Reviews

              There are no open Gerrit changes