Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-9149

Blob's TOJSON Section is not the main use case and could lead to confusion

    XMLWordPrintable

Details

    • 1

    Description

      Reference: https://ibsoln.github.io/stage/stage300/couchbase-lite/current/csharp/document.html

      Using Blob'S TOJSON() is not a common usecase and it's mainly for helping development of some binding language such as JavaScript. Providing a section and example there is just confusing users. If we want to provide into, it's better to have an entirely new section about binding development for CBL. I suggested to remove that section.

      Attachments

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

        Activity

          pasin Pasin Suriyentrakorn added a comment - - edited

          Ian Bridge I think we could either make it secondary option or remove then improve it post beta. I think the code snippet could be :

          1. Create and save a blob to database.

          2. Create a JSON including the Blob JSON from 1.

          3. Create a document from JSON and save into the database.

          The example above explains how to use pure JSON that includes blob to create a document and save into the database. The use cases for the example above will be :

          1. Create and save a document into the database from JSON & blob getting for a REST API.

          2. That will be the steps that JavaScript binding could do in order to save a document with blobs.

          Please let me know when the revise content is ready so I could make the code snippet accordingly.

          pasin Pasin Suriyentrakorn added a comment - - edited Ian Bridge  I think we could either make it secondary option or remove then improve it post beta. I think the code snippet could be : 1. Create and save a blob to database. 2. Create a JSON including the Blob JSON from 1. 3. Create a document from JSON and save into the database. The example above explains how to use pure JSON that includes blob to create a document and save into the database. The use cases for the example above will be : 1. Create and save a document into the database from JSON & blob getting for a REST API. 2. That will be the steps that JavaScript binding could do in order to save a document with blobs. Please let me know when the revise content is ready so I could make the code snippet accordingly.
          Ian.bridge Ian Bridge added a comment -

          @pasin – I have reworked the content for this page and used the existing blob example (no JSON for now). 

          I'd appreciate your help working on the JSON use case you outlined above, post-beta.

          Ian.bridge Ian Bridge added a comment - @pasin – I have reworked the content for this page and used the existing blob example (no JSON for now).  I'd appreciate your help working on the JSON use case you outlined above, post-beta.

          Ian BridgeFor   Planning purposesWe should definitely support the JSON option pre Connect. ("public beta")

          priya.rajagopal Priya Rajagopal added a comment - Ian Bridge For   Planning purposesWe should definitely support the JSON option pre Connect. ("public beta")

          People

            Ian.bridge Ian Bridge
            pasin Pasin Suriyentrakorn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty