Uploaded image for project: 'Couchbase Go SDK'
  1. Couchbase Go SDK
  2. GOCBC-183

Allow us of []byte for unmarshalling all types.

    XMLWordPrintable

Details

    Description

      The Go SDK currently fails to unmarshal JSON types into a []byte, but should succeed and return the raw bytes.

      Attachments

        For Gerrit Dashboard: GOCBC-183
        # Subject Branch Project Status CR V

        Activity

          adamf Adam Fraser added a comment - - edited

          I'm not sure if you're planning to handle the subdoc cases in this ticket, but there's also a marshalling scenario to go along with the unmarshalling case:

          https://github.com/couchbase/gocb/blob/master/bucket_subdoc.go#L184

          If the incoming value is already []byte, can we skip the marshal and pass through as-is?  That would allow us to write xattrs that are already marshalled to []byte.

           

           

          adamf Adam Fraser added a comment - - edited I'm not sure if you're planning to handle the subdoc cases in this ticket, but there's also a marshalling scenario to go along with the unmarshalling case: https://github.com/couchbase/gocb/blob/master/bucket_subdoc.go#L184 If the incoming value is already []byte, can we skip the marshal and pass through as-is?  That would allow us to write xattrs that are already marshalled to []byte.    

          Hey Adam Fraser,

          We indeed would go both ways with it.

          Cheers, Brett

          brett19 Brett Lawson added a comment - Hey Adam Fraser , We indeed would go both ways with it. Cheers, Brett

          Build 5.0.0-2592 contains gocb commit 92706fe26b36a706406fb2391d7c3c90ddddf81b with commit message:
          GOCBC-183: Add support for access raw sub-document bytes.
          https://github.com/couchbase/gocb/commit/92706fe26b36a706406fb2391d7c3c90ddddf81b

          build-team Couchbase Build Team added a comment - Build 5.0.0-2592 contains gocb commit 92706fe26b36a706406fb2391d7c3c90ddddf81b with commit message: GOCBC-183 : Add support for access raw sub-document bytes. https://github.com/couchbase/gocb/commit/92706fe26b36a706406fb2391d7c3c90ddddf81b

          People

            brett19 Brett Lawson
            brett19 Brett Lawson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty