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

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

          Activity

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

           

           

          Show
          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.    
          Hide
          brett19 Brett Lawson added a comment -

          Hey Adam Fraser,

          We indeed would go both ways with it.

          Cheers, Brett

          Show
          brett19 Brett Lawson added a comment - Hey Adam Fraser , We indeed would go both ways with it. Cheers, Brett
          Hide
          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

          Show
          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

            • Assignee:
              brett19 Brett Lawson
              Reporter:
              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

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.