Skip to content

"breaking change" in json 2.9.1->2.10.0? #754

@bastelfreak

Description

@bastelfreak

Hi,
I'm one of the maintainers of https://github.com/voxpupuli/metadata-json-lint, where we validate a JSON file for the Puppet ecosystem. The relevant code (I think so, at least):

  # https://github.com/voxpupuli/metadata-json-lint/blob/03574807f8a7e05cfc22b48a86c25fd2137b5d75/lib/metadata_json_lint.rb#L103C1-L107C8
    begin
      parsed = JSON.parse(f)
    rescue Exception => e
      abort("Error: Unable to parse metadata.json: #{e.exception}")
    end

We've some tests in the module, they pass with json 2.9.1 and older. One of the tests assume the following error:

Error: Unable to parse metadata.json: unexpected token at '{
  "name": "puppetlabs-postgres'

With json 2.10.1 we get:

Error: Unable to parse metadata.json: expected ',' or '}' after object value, got: '"version": "3.4.1",
  "author": '

This could be considered as a breaking change, if we assume the output is even something like a stable/public API. Can you tell me if the rewording was intentional?

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