← Prev in month ← Prev in thread

CSAF JSON Schema - remove a level of nesting for lists of things.

From
Eric Johnson <>
Date
2018-05-02T18:12:05+00:00
ID
CANu9=
Thread
CSAF JSON Schema - remove a level of nesting for lists of things.
Again, possibly, the conversion from the XML generated slightly odd JSON.

The CVRF specification defines a "RevisionHistory" element which has 1-N instances of "Revision".

In JSON:

      "revision_history": {

         "revision": [

            {

               "number": "1.0",

               "date": "2018-03-28T15:17:05",

               "description": "Initial public release."

            },

...

However, this is a completely unnecessary level of nesting (arguably so in XML as well, but there it is less clear).

Suggestion: Change all cases where we're doing this unnecessary nesting, remove it. The above JSON becomes:

      "revision_history": [

            {

               "number": "1.0",

               "date": "2018-03-28T15:17:05",

               "description": "Initial public release."

            },

...

This occurs in a number of places:

/document_tracking/revision_history/revision[] -->

  /document_tracking/revision_history

/vulnerabilities/notes/note[] -->

  /vulnerabilities/notes[]

/vulnerabilities/remediations/remediation[] -->

  / vulnerabilities/remediations[]

/vulnerabilities/references/reference[] -->

  /vulnerabilities/references[]

/document_notes/note[] -->

  /document_notes[]

/document_references/reference[] -->

  / document_references[]

Any objections to simply collapsing these paths as documented above?

Eric.
← Prev in month ← Prev in thread