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

FwLiteWeb creating new sense has entryId "" (empty string), which .NET refuses to parse as a GUID #1363

Open
rmunn opened this issue Jan 10, 2025 · 0 comments
Labels
bug Something isn't working 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related

Comments

@rmunn
Copy link
Contributor

rmunn commented Jan 10, 2025

Describe the bug
Creating a new sense in an example FwLite project ends up with:

Error: System.Text.Json.JsonException: The JSON value could not be converted to System.Guid. Path: $.senses[0].entryId | LineNumber: 0 | BytePositionInLine: 196.

The JSON in question includes Senses[0] as { id: "00000000-0000-0000-0000-df85dbc25d08", entryId: "", definition: {…}, … } - note entryId being an empty string.

To Reproduce
Steps to reproduce the behavior:

  1. Run task fw-lite-web
  2. Create new example project
  3. Create new sense in first entry
  4. Edit definition field, tab out
  5. See error

Expected behavior
A missing entryId would be serialized as null rather than an empty string, or the C# backend code would handle the empty string as a special case in deserializing GUIDs and replace it with either null (for a nullable GUID property) or Guid.Empty (for a non-nullable GUID property).

@rmunn rmunn added bug Something isn't working 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related labels Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related
Projects
None yet
Development

No branches or pull requests

1 participant