This repository was archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Writable Json DOM - JsonNumber implementation and tests #39917
Merged
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
8013865
Json prototype (#1)
kasiabulat 0f7df28
Json prototype - transformation API (#2)
kasiabulat 6cd2efb
Json prototype (#1)
kasiabulat 409e575
Json prototype - transformation API (#2)
kasiabulat 25109c3
Merge branch 'master' of https://github.com/kasiabulat/corefx
kasiabulat 9dcfc4b
JsonNumber implementation and tests (#3)
kasiabulat 38af6d9
Merge remote-tracking branch 'upstream/master'
kasiabulat 08f4734
all unimplemented classes and methods with accompanying tests removed
kasiabulat 63ff329
First part of documentation added
kasiabulat 0e0fb7c
documentation completed
kasiabulat 47666ce
missing exceptions added
kasiabulat d856681
JsonElement changes removed
kasiabulat 22e6558
part of the review comments included
kasiabulat 04441f1
work on review comments
kasiabulat 30c5dd0
code refactor
kasiabulat 8f3e510
more decimal tests added using MemberData
kasiabulat c6ab148
more decimal tests added using MemberData
kasiabulat 259590b
more test cases added
kasiabulat c4d6ef2
equals summary adjusted, equals tests added
kasiabulat 01c230f
more Equals tests added, GetHashCode tests added, minor changes
kasiabulat 392142a
scientifing notation support added, rational numbers tests fixes
kasiabulat 310a5a6
rational overflow tests added
kasiabulat e03b803
ulong maxvalue tests added to rational types
kasiabulat 95a9401
presision problems fixes
kasiabulat 2bd6871
exception strings fixed
kasiabulat f0c4814
CI failing fixes (hopefully), review comments included
kasiabulat c22b36d
missing == tests added to achieve 100% branch coverage
kasiabulat 7dfc891
review comments included
kasiabulat 07746d8
Merge remote-tracking branch 'upstream/master' into kasiabulat/json-n…
kasiabulat d479fa7
Merge remote-tracking branch 'upstream/master' into kasiabulat/json-n…
kasiabulat ab1401a
trailing whitespaces fixes
kasiabulat 217bade
equals comments added
kasiabulat 40a6649
equals object refactored to call quals json number
kasiabulat af4aed3
Merge conflicts resolved
kasiabulat f534415
merge fix
kasiabulat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Json prototype (#1)
Basic API for Json writable DOM with scenarios including collection initialization, accessing and modifying Json nodes.
- Loading branch information
commit 6cd2efbdf4997c811b593b466a94edffaba19d76
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 104 additions & 0 deletions
104
src/System.Text.Json/src/System/Text/Json/Node/JsonArray.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| // See the LICENSE file in the project root for more information. | ||
|
|
||
| using System.Collections; | ||
| using System.Collections.Generic; | ||
|
|
||
| // for now disabling error caused by not adding documentation to methods | ||
| #pragma warning disable CS1591 | ||
|
|
||
| namespace System.Text.Json | ||
| { | ||
| public partial class JsonArray : JsonNode, IList<JsonNode>, IReadOnlyList<JsonNode> | ||
| { | ||
| public JsonArray() { } | ||
| public JsonArray(IEnumerable<JsonNode> values) { } | ||
| public JsonArray(IEnumerable<string> values) { } | ||
| public JsonArray(IEnumerable<bool> values) { } | ||
| public JsonArray(IEnumerable<byte> values) { } | ||
| public JsonArray(IEnumerable<short> values) { } | ||
| public JsonArray(IEnumerable<int> values) { } | ||
| public JsonArray(IEnumerable<long> values) { } | ||
| public JsonArray(IEnumerable<float> values) { } | ||
| public JsonArray(IEnumerable<double> values) { } | ||
| [CLSCompliant(false)] | ||
| public JsonArray(IEnumerable<sbyte> values) { } | ||
| [CLSCompliant(false)] | ||
| public JsonArray(IEnumerable<ushort> values) { } | ||
| [CLSCompliant(false)] | ||
| public JsonArray(IEnumerable<uint> values) { } | ||
| [CLSCompliant(false)] | ||
| public JsonArray(IEnumerable<ulong> values) { } | ||
|
|
||
| public JsonNode this[int idx] { get => throw null; set => throw null; } | ||
|
|
||
| public void Add(JsonNode value) { } | ||
| public void Add(string value) { } | ||
| public void Add(bool value) { } | ||
| public void Add(byte value) { } | ||
| public void Add(short value) { } | ||
| public void Add(int value) { } | ||
| public void Add(long value) { } | ||
| public void Add(float value) { } | ||
| public void Add(double value) { } | ||
| [CLSCompliant(false)] | ||
| public void Add(sbyte value) { } | ||
| [CLSCompliant(false)] | ||
| public void Add(ushort value) { } | ||
| [CLSCompliant(false)] | ||
| public void Add(uint value) { } | ||
| [CLSCompliant(false)] | ||
| public void Add(ulong value) { } | ||
|
|
||
| public void Insert(int index, JsonNode item) { throw null; } | ||
| public void Insert(int index, string item) { throw null; } | ||
| public void Insert(int index, bool item) { throw null; } | ||
| public void Insert(int index, byte item) { throw null; } | ||
| public void Insert(int index, short item) { throw null; } | ||
| public void Insert(int index, int item) { throw null; } | ||
| public void Insert(int index, long item) { throw null; } | ||
| public void Insert(int index, float item) { throw null; } | ||
| public void Insert(int index, double item) { throw null; } | ||
| [CLSCompliant(false)] | ||
| public void Insert(int index, sbyte item) { throw null; } | ||
| [CLSCompliant(false)] | ||
| public void Insert(int index, ushort item) { throw null; } | ||
| [CLSCompliant(false)] | ||
| public void Insert(int index, uint item) { throw null; } | ||
| [CLSCompliant(false)] | ||
| public void Insert(int index, ulong item) { throw null; } | ||
|
|
||
| public bool Contains(JsonNode value) { throw null; } | ||
| public bool Contains(string value) { throw null; } | ||
| public bool Contains(bool value) { throw null; } | ||
| public bool Contains(byte value) { throw null; } | ||
| public bool Contains(short value) { throw null; } | ||
| public bool Contains(int value) { throw null; } | ||
| public bool Contains(long value) { throw null; } | ||
| public bool Contains(float value) { throw null; } | ||
| public bool Contains(double value) { throw null; } | ||
| [CLSCompliant(false)] | ||
| public bool Contains(sbyte value) { throw null; } | ||
| [CLSCompliant(false)] | ||
| public bool Contains(ushort value) { throw null; } | ||
| [CLSCompliant(false)] | ||
| public bool Contains(uint value) { throw null; } | ||
| [CLSCompliant(false)] | ||
| public bool Contains(ulong value) { throw null; } | ||
|
|
||
| public int Count => throw new NotImplementedException(); | ||
| public bool IsReadOnly => throw new NotImplementedException(); | ||
|
|
||
| public int IndexOf(JsonNode item) { throw null; } | ||
| public void RemoveAt(int index) { throw null; } | ||
| public void Clear() { throw null; } | ||
| public bool Remove(JsonNode item) { throw null; } | ||
|
|
||
| void ICollection<JsonNode>.CopyTo(JsonNode[] array, int arrayIndex) { throw null; } | ||
| IEnumerator IEnumerable.GetEnumerator() { throw null; } | ||
| public IEnumerator<JsonNode> GetEnumerator() { throw null; } | ||
| } | ||
| } | ||
|
|
||
| #pragma warning restore CS1591 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.