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

Json deserialisation failing when reading back eventstore #30

Closed
AndrewIOM opened this issue Feb 22, 2022 · 1 comment
Closed

Json deserialisation failing when reading back eventstore #30

AndrewIOM opened this issue Feb 22, 2022 · 1 comment
Labels

Comments

@AndrewIOM
Copy link
Owner

AndrewIOM commented Feb 22, 2022

When rebuilding the read model, there has been a regression whereby certain events that contain a tuple with an option type are failing to deserialise. May be related to changes in FSharpLu.Json.

example failure:

{
  "Imported": {
    "Id": {
      "TaxonId": "9f7a2a2a-8a18-4be4-8c4d-f45d88d54246"
    },
    "Group": "Angiosperm",
    "Identity": {
      "Species": [
        {
          "LatinName": "Aster"
        },
        {
          "SpecificEphitet": "subintegerrimus"
        },
        {
          "Scientific": "Trautv."
        }
      ]
    },
    "Parent": {
      "TaxonId": "47597ce4-8a0f-468c-a25e-b6523d24176b"
    },
    "Status": "Accepted",
    "Reference": {
      "Item1": "\"Reisen in Europa, Asien und Afrika 1:\", 161, 1847"
    }
  }
}

Types are at: https://github.com/AndrewIOM/gpp-cqrs/blob/master/src/Services/Core/GlobalPollenProject.Core/Taxonomy.fs

@AndrewIOM AndrewIOM added the bug label Feb 22, 2022
@AndrewIOM
Copy link
Owner Author

After investigation, it appears that FSharpLu has updated their algorithm for serialisation (compact mode) but included the legacy implementation in a Legacy module. If we switch to the legacy version, serialisation works again as expected for all types. Switching Compact.deserialize< ^T> to Compact.Legacy.deserialize< ^T> fixes the issue.

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

No branches or pull requests

1 participant