Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow constructor property in Json #1

Open
klntsky opened this issue Jun 22, 2023 · 1 comment
Open

Allow constructor property in Json #1

klntsky opened this issue Jun 22, 2023 · 1 comment

Comments

@klntsky
Copy link
Member

klntsky commented Jun 22, 2023

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

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

it comes from this library:

> 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` }
@klntsky klntsky changed the title Allow constructor property in Aeson Allow constructor property in Json Jun 22, 2023
@klntsky
Copy link
Member Author

klntsky commented Jun 22, 2023

moved to mlabs-haskell/purescript-aeson#16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant