Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Writable Json DOM - JsonNumber implementation and tests - #39917

Merged
35 commits merged into
dotnet:masterfrom
kasiabulat:kasiabulat/json-number
Aug 9, 2019
Merged

35 commits merged into
dotnet:masterfrom
kasiabulat:kasiabulat/json-number

Conversation

@kasiabulat

Copy link
Copy Markdown
Contributor

I am working on adding writable Json DOM under System.Text.Json. It will be modifiable, dictionary-backed API to complement the readonly JsonDocument, with type hierarchy consisting of the base type JsonNode. Currently, I have implemented JsonNumber which is supposed to represent Json numeric value. Other derived types which we are planning to add include: JsonString, JsonBoolean, JsonArray and JsonObject.

More scenarios are available in this class:
https://github.com/kasiabulat/corefx/blob/master/src/System.Text.Json/tests/WritableJsonApiTests.cs
(also in files: WritableJsonApiTests.TestAccessingNestedMembers.cs, WritableJsonApiTests.TestModifying.cs and WritableJsonApiTests.TestTransformations.cs)

cc: @joperezr @bartonjs @ericstj @ahsonkhan @terrajobst @JamesNK

Katarzyna Bułat and others added 12 commits July 17, 2019 13:19
Basic API for Json writable DOM with scenarios including collection initialization, accessing and modifying Json nodes.
* transformation API added
* assertions to existing scenarios added
Basic API for Json writable DOM with scenarios including collection initialization, accessing and modifying Json nodes.
* transformation API added
* assertions to existing scenarios added
* IEquatables added
* JsonNumber implementation and unit tests added
* pragmas deleted
* review comments included, more tests added
* decimal support added to JsonNumber
* decimal support added to JsonArray and JsonObject
@dnfclas

ghost commented Jul 31, 2019 •

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@ericstj
ericstj requested review from ahsonkhan, bartonjs and joperezr and removed request for bartonjs and joperezr July 31, 2019 17:24
@ericstj

ghost commented Jul 31, 2019

Copy link
Copy Markdown
Member

Can you make sure to have an issue tracking the API review?

@kasiabulat

ghost commented Jul 31, 2019

Copy link
Copy Markdown
Contributor Author

I created an issue: #39922 and added a PR in my fork with specification: kasiabulat#4.

@joperezr

ghost commented Jul 31, 2019

Copy link
Copy Markdown
Member

We will want that spec checked-in to corefx main fork as well, so do you mind sending another PR to merge that here as well plz?

@ahsonkhan ahsonkhan added this to the 5.0 milestone Jul 31, 2019
@kasiabulat

ghost commented Aug 7, 2019 •

Copy link
Copy Markdown
Contributor Author

🎉 CI works! 🎉
Thank you for all of the suggestions and feedback!
There's only one thing left to consider - currently throwing implicit casts, but maybe for now I can just add it to open questions in specification. (?)

@ericstj

ghost commented Aug 7, 2019

Copy link
Copy Markdown
Member

but maybe for now I can just add it to open questions in specification. (?)

Or file an issue to track it, whichever you prefer.

ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fix NumberStyles.Float usage.

ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Other than merge conflict in resx file, good to merge.

@kasiabulat kasiabulat added the auto-merge Automatically merge PR once CI passes. label Aug 8, 2019

ghost commented Aug 8, 2019

Copy link
Copy Markdown

Hello @kasiabulat!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ahsonkhan

ghost commented Aug 9, 2019 •

Copy link
Copy Markdown

The MacOS test failure is unrelated (in System.Net.Http.Functional.Tests): https://github.com/dotnet/corefx/issues/40115
https://helix.dot.net/api/2019-06-17/jobs/7b444b61-7a47-4c52-a600-4ae703d727cd/workitems/System.Net.Http.Functional.Tests/console

This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Text.Json auto-merge Automatically merge PR once CI passes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants