Skip to content

Clarification in steps to set a JSON encoding value #39

@LinusU

Description

@LinusU

In "steps to set a JSON encoding value", bullet 8.3.2.3:

Otherwise, set the context's property named by the step's key to object.

What it the word Otherwise referring to? I think it's unclear and as far as I can understand there isn't any condition on wether to set the context's property named by the step's key to object. I think that it should always be done.

Context:

Else if current value is an Array, then rub the following subsubsteps:

  1. If step's next type is "array", return current value.
  2. Otherwise, run the following
  3. Let object be a new empty Object.
  4. For each item and zero-based index i in current value, if item is not undefined then set a property of object named i to item.
  5. Otherwise, set the context's property named by the step's key to object.
  6. Return object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions