The usage of pendulum in kiota_serialization_json #908
Labels
Status: No Recent Activity
status:waiting-for-author-feedback
Issue that we've responded but needs author feedback to close
type:bug
A broken experience
Describe the bug
I am trying to fetch data from sharepoint using msgraph as the following:
result = await (
graph_client
.drives.by_drive_id(self.drive_id)
.items.by_drive_item_id(self.spreadsheet_id)
.workbook.worksheets.by_workbook_worksheet_id(range_name)
.used_range.get()
)
A cell in my sharepoint excel sheet is in string "now", after fetching with the SDK, the value become an object with type <class 'pendulum.datetime.DateTime'> with the realtime DateTime. This is not what we want the data format, we only need the string without any modification from sharepoint excel.
The problem occurs in function
try_get_anything()
in json_parse_node.py in kiota_serialization_jsonI don't know why the design need to parse with pendulum first if the value is string. In most use case of fetching data, we just want to string from excel without modification. Also, pendulum hasn't been update for a long time since 3.0 version.
This problem also occurs before when the string is a four digit number. #653
My suggestion is that removing the parse of pendulum in try_get_anything() and just return pure sting for user.
Expected behavior
"now" as a string in result instead of an object with <class 'pendulum.datetime.DateTime'> type.
How to reproduce
Fetching data from sharepoint excel if the cell is "now"
SDK Version
1.5.4
The text was updated successfully, but these errors were encountered: