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

Support for Json (de)serialization #35

Merged
merged 82 commits into from
Nov 18, 2024
Merged

Support for Json (de)serialization #35

merged 82 commits into from
Nov 18, 2024

Conversation

joanne-ter-maat
Copy link
Collaborator

No description provided.

Kees-Schotanus and others added 30 commits August 21, 2024 08:03
The code still needs a lot of work.
It has no support yet for:
- additional data
- enums
- collections
- events

It does run the first unit test however so the foundation seems to be good.
Due to implemnation of getChildNode, getting an object based on a discriminator works.
Enums with a text value are supported (but not generically)
Durations are supported.
Additional data is supported plus duration, date and time.
(de)Serilization is by no means complete but good enough to start generating code.
We will generate code for a simple client that gets version informationof an app.
As it looks like the lower case version is used everywhere
including in other languages than Dart.
Previously we had to manually copy the version.dart file in our  .pub-cache folder.
@ricardo. I tried to not ignore the verion.dart file in .gitignore
But it ignored it anyway.
I know this is not a good solution that I will have to fix later.
Code seems to work with correct version.dart file.
Solved compilation error.
Oddly enough the code seemed to work with this error.
Switched from StringBuffer to using Uint8Buffer as it supports
adding (binary) data.
In the process I had to make the return value of getValue(), nullable.
@Kees-Schotanus Kees-Schotanus marked this pull request as ready for review October 24, 2024 06:49
I know that the version.dart file is generated
and not committed, but if I want to hand a generated SDK to a client
they do not have the generated file and run into a problem.

I will have to discuss this with Ricardo.
I know that the version.dart file is generated
and not committed, but if I want to hand a generated SDK to a client
they do not have the generated file and run into a problem.

I will have to discuss this with Ricardo.
Copy link
Member

@ricardoboss ricardoboss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good. I think this is ready for merging soon!

@ricardoboss
Copy link
Member

@joanne-ter-maat @Kees-Schotanus can one of you add yourselves to the .github/CODEOWNERS file for the json package?

@ricardoboss ricardoboss linked an issue Nov 17, 2024 that may be closed by this pull request
Copy link
Member

@ricardoboss ricardoboss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Just fix the conflicts and this should be ready. Great work!

@ricardoboss ricardoboss merged commit 584b68c into main Nov 18, 2024
19 checks passed
@ricardoboss ricardoboss deleted the json branch November 18, 2024 10:03
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.

kiota_serialization_multipart: Multipart serialization kiota_serialization_json: JSON serialization
3 participants