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

Date time and null strings fix #59

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MaxLogic
Copy link

I implemented the following changes, you might be interested in:

  • Grijjy.Bson.Serialization.pas
    TgoBsonSerializer.DeserializeString(): do not be so strict with the type casts. We can cast a int to a string - no problems.
    this can happen if the REST endpoint changed a field from string to integer, but the delphi class/record did not reflect those changes.

  • Grijjy.Bson.pas:
    TValueNull.ToString
    returns '' instead of 'null' - which is the more delphi way to handle missing fields and empty strings. besides, it could be confused with the string having a content of "null"

  • Grijjy.Bson.Serialization.pas:
    the ISO8601ToDate() requires a "T" to separate the date part from the time part

  TValueNull.ToString
  returns '' instead of 'null' - which is the more delphi way to handle missing fields and empty strings. besides, it could be confused with the string having a content of "null"
Grijjy.Bson.Serialization.pas:
  the ISO8601ToDate() requires a "T" to separate the date part from the time part
TgoBsonSerializer.DeserializeString(): do not be so strict with the type casts. We can cast a int to a string - no problems.
  this can happen if the REST endpoint changed a field from string to integer, but the delphi class/record did not reflect those changes.
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

Successfully merging this pull request may close these issues.

1 participant