Skip to content

JSON: Encoding global measures as empty objects #296

@adrianholovaty

Description

@adrianholovaty

The "global" object of an MNX document contains a "measures" array, with global information on each measure. At the moment, each measure in the document must be represented by an object — which can result in an array containing lots of empty objects.

For example, see the Multimeasure rests example document:

"global": {
   "measures": [
      {
         "barline": {
            "type": "regular"
         },
         "time": {
            "signature": "4/4"
         }
      },
      {},
      {},
      {},
      {},
      {},
      {}
   ]
}

This is a bit inelegant, and I could see it confusing newcomers to MNX. Is there a better solution?

I should note that the XML version of MNX had this same ugliness, with a bunch of empty elements in the <global> section.

Personally I think it's OK, with the philosophy being that MNX will be created and consumed by programs, but I'm bringing it up in case anybody has an amazing better idea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions