Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-12078

JSON detection may not be correct at views

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Minor
    • None
    • 2.5.1, 3.0, 3.0.1
    • view-engine
    • Security Level: Public
    • None
    • Untriaged
    • Unknown

    Description

      Brett Lawson and I were reviewing something for encoding for client libraries and in the process we checked what JSON specs consider legal. There's this interesting bit:

      http://tools.ietf.org/html/rfc7159#section-2

      JSON text is a sequence of tokens. The set of tokens includes six
      structural characters, strings, numbers, and three literal names.

      A JSON text is a serialized value. Note that certain previous
      specifications of JSON constrained a JSON text to be an object or an
      array. Implementations that generate only objects or arrays where a
      JSON text is called for will be interoperable in the sense that all
      implementations will accept these as conforming JSON texts.

      This actually means that the numeric values stored by memcached protocol are valid JSON, though the view engine doesn't treat them that way. I believe they're detected as non-JSON at view engine. I'm not sure if this is still the case with 3.0, but I thought I should file this since the revelation that a sequence of digits is valid JSON may trigger some thoughts (or unit tests).

      Attachments

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

        Activity

          People

            siri Sriram Melkote (Inactive)
            ingenthr Matt Ingenthron
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty