Skip to content

Use quirks_mode when parsing JSON #92

@souliane

Description

@souliane

Please set the option ":quirks_mode => true" when calling JSON.parse in
pact/consumer/mock_service/rack_request_helper.rb, line 31.

Ruby JSON library doesn't consider serialized string as a correct JSON value (which is is false statement!) and this quirks_mode is needed for working with string encoded as JSON:
https://makandracards.com/makandra/15611-how-to-fix-unexpected-token-error-for-json-parse

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