Skip to content

Allow constructor property in Json #16

@klntsky

Description

@klntsky
> parseJsonStringToAeson "{\"constructor\": \"Just\"}"
(Left (TypeMismatch "JSON String"))

> parseJsonStringToAeson "{\"constructo\": \"Just\"}"  
(Right {"constructo":"Just"})

it comes from our fork of json-bigint lib:

> jsonBigint.parse("{\"constructor\": \"Just\"}")

Uncaught:
{
  name: 'SyntaxError',
  message: 'Object contains forbidden constructor property',
  at: 16,
  text: '{"constructor": "Just"}'
}

We should probably initialize it with

{ constructorAction: 'preserve` }

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