Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

MSON Implementation Limitations

Pavan Kumar Sunkara edited this page Jan 20, 2015 · 4 revisions

Headers in description of Named Types

Given the following valid MSON according to the MSON spec

# Data Structures 
## User (object)
This is description for user
### Sub header
This is also description for user
### Properties
- id: 1 (number, required) - The unique identifier for a user

Snow crash is unable to parse it as a single named type and results in parsing it as two different named types, one named User and the other Sub header.

Solutions

  • Clarify the MSON spec at here to disallow Markdown headers in Block Description Type Section.
  • Make the header markdown nodes in the markdown AST nested under each other based on the headers level. (Conceptually wrong).

Decision

PENDING


When Sample type section defined first in a non-type specified member

Given the following valid MSON according to the MSON spec

# Data Structures
## User
- name: pksunkara (string)
- metadata
  + Sample
    - user (object)
      - id: 1093
  + Properties
    - id: 1 (number, required) - The unique identifier for a user

The resolved type for metadata property in User object should be object. But snow crash resolves it as string since it encounters Sample first before Properties nested section.

Solutions

  • Change the snow crash architecture to facilitate looking at all the nested sections before parsing the current node. (This just introduces new problems).

Decision

Leave it as it is until someone really needs it.