Skip to content

Remove JsonValue.fs from client and use System.Text.Json #328

@xperiandri

Description

@xperiandri

Description

The JsonValue.fs deserializer deserializes 0 into int while it must deserialize it into the type requested by the schema. Which is float in my case.
We can simply use System.Text.Json package version 5 as it is done in https://github.com/fsprojects/SwaggerProvider/tree/net5 with https://github.com/Tarmil/FSharp.SystemTextJson/

Repro steps

  1. Define Float field in GraphQL and return 0.0 from it
  2. Use System.Text.Json as a serializer
  3. You will get int option

Expected behavior

Value is deserialized into the type defined by the schema

Actual behavior

Value is deserialized into the type chosen by JsonValue.fs logic

Related information

1.0.7

Metadata

Metadata

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