Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-160

Allow comments in schema definitions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      What about allowing comments in the JSON schema? May prove useful as schemata get more complex.

      Pro

      • documented schema

      Con

      • non-standard JSON

      Alternative

      • pseudo-element, e.g. _comment: "..."
      • redefine hack: (see: http://fadefade.com/json-comments.html )
        It's possible to redefine Javascript object attributes:
        > Object.keys(JSON.parse(' {"a": 1, "a": 2}

        ')).length;
        => 1;
        So you can do this:
        "favorite_numbers": "An array containing my all-time favorite numbers",
        "favorite_numbers": [19, 13, 53]

      It looks like standard javascript comments could be enabled here:
      net/hydromatic/optiq/model/ModelHandler.java(54)
      by setting the ALLOW_COMMENTS flag.

      ---------------- Imported from GitHub ----------------
      Url: https://github.com/julianhyde/optiq/issues/160
      Created by: HenryOlson
      Labels:
      Created at: Tue Feb 25 22:23:20 CET 2014
      State: closed

      Attachments

        Activity

          People

            Unassigned Unassigned
            github-import GitHub Import
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: