Skip to content

Prototype moving JsonData to be backed by JsonDocument #33063

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

Merged
merged 107 commits into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
8e43b11
Add WriteTo(), ==operators, and PR FB
annelo-msft Dec 13, 2022
b49a143
export API
annelo-msft Dec 13, 2022
74058d9
Merge remote-tracking branch 'upstream/main' into jsondata-perfexp1
annelo-msft Dec 14, 2022
bb44811
Merge remote-tracking branch 'upstream/main' into jsondata-perfexp1
annelo-msft Dec 14, 2022
a436b30
Add DocumentSentiment large JSON sample and add parse and read benchm…
annelo-msft Dec 14, 2022
5673466
initial attempt to move to JsonElement
annelo-msft Dec 14, 2022
3c35174
some fixes
annelo-msft Dec 14, 2022
136c6c3
updates
annelo-msft Dec 15, 2022
61289a7
nit
annelo-msft Dec 15, 2022
7843b4e
Merge remote-tracking branch 'upstream/main' into jsondata-perfexp1
annelo-msft Dec 15, 2022
e1be79b
nits
annelo-msft Dec 16, 2022
adc22ec
Merge remote-tracking branch 'upstream/main' into jsondata-perfexp1
annelo-msft Dec 16, 2022
eefa39a
starting to experiment with changelist approach
annelo-msft Dec 16, 2022
4a376f1
an approach to object assignment
annelo-msft Dec 16, 2022
fbe0894
start working with array elements
annelo-msft Dec 17, 2022
1e8d2eb
saving changes from before break...
annelo-msft Jan 3, 2023
499a72b
Merge remote-tracking branch 'upstream/main' into jsondata-perfexp1
annelo-msft Jan 5, 2023
3a20c5d
sm formatting pr fb
annelo-msft Jan 5, 2023
49f089a
ApiView FB per generality of DynamicData
annelo-msft Jan 5, 2023
878e431
nits
annelo-msft Jan 5, 2023
1bfe071
small thoughts
annelo-msft Jan 6, 2023
a694231
first steps toward abstracting ChangeTracker
annelo-msft Jan 6, 2023
82b5316
In flight changes while implementing AddPropertyToObject
annelo-msft Jan 6, 2023
c126dca
adding tests with simple modifications to structural elements
annelo-msft Jan 7, 2023
7094bfb
Merge remote-tracking branch 'upstream/main' into jsondata-perfexp1
annelo-msft Jan 17, 2023
e3b313b
Implementing WriteTo()
annelo-msft Jan 17, 2023
937a224
Added nested objects
annelo-msft Jan 17, 2023
aa9c666
refactor
annelo-msft Jan 17, 2023
632985e
missed changes
annelo-msft Jan 17, 2023
934ee4c
In TDD spirit, add failing WriteTo test
annelo-msft Jan 18, 2023
1dd1ef8
Test passes
annelo-msft Jan 18, 2023
9f28d81
quick refactor
annelo-msft Jan 18, 2023
26bb1b7
update add property test
annelo-msft Jan 18, 2023
21c1ab2
Merge remote-tracking branch 'upstream/main' into core-jsondata-write…
annelo-msft Jan 19, 2023
ac891c5
Update WriteTo to handle property additions at the root element
annelo-msft Jan 19, 2023
5f34ffb
Handle property additions on arbitrary objects
annelo-msft Jan 19, 2023
902df1c
Merge remote-tracking branch 'upstream/main' into jsondata-perfexp1
annelo-msft Jan 19, 2023
63f1e6d
handle standard property removals
annelo-msft Jan 19, 2023
78babed
Support Replace with object
annelo-msft Jan 19, 2023
0b21508
Support Replace with object
annelo-msft Jan 19, 2023
48a9fee
refactor where we serialize structural changes to centralize
annelo-msft Jan 20, 2023
9d0039c
Implement reference semantics for JsonDataElement
annelo-msft Jan 20, 2023
53dd7e9
experiment with checking ancestors for structural changes.
annelo-msft Jan 21, 2023
54c8c08
Update WriteTo to handle structural changes.
annelo-msft Jan 21, 2023
dd773d7
add high water mark logic
annelo-msft Jan 23, 2023
e37981d
add validation to all reads and add failing test for ignoring pre-str…
annelo-msft Jan 23, 2023
161d578
Incorporate HWM logic in all change lookups; make PriorChangeToReplac…
annelo-msft Jan 23, 2023
6d48737
remove double-check of object and array elements
annelo-msft Jan 23, 2023
e325e32
some tidy up
annelo-msft Jan 23, 2023
7ef3d9a
Merge remote-tracking branch 'upstream/main' into jsondata-perfexp1
annelo-msft Jan 23, 2023
8af0eb2
Reimplement GetProperty in terms of TryGetProperty()
annelo-msft Jan 23, 2023
7327d16
Handle WriteTo for structural changes.
annelo-msft Jan 23, 2023
336b531
add some tests of structural changes
annelo-msft Jan 24, 2023
3c5032d
refactor tests
annelo-msft Jan 24, 2023
6954115
Bug fix to WriteTo for bools and test refactoring
annelo-msft Jan 24, 2023
3b84c28
bug fix to WriteTo for booleans
annelo-msft Jan 24, 2023
2b13efb
Add support for nulls and fix ToLower() bug
annelo-msft Jan 24, 2023
62671ed
add perf benchmark prior to working on perf
annelo-msft Jan 24, 2023
1c3f34b
missed file
annelo-msft Jan 24, 2023
df84bc0
update Parse() to use Memory<byte>
annelo-msft Jan 24, 2023
f2b94d8
move subclasses to separate files for ease of reading
annelo-msft Jan 25, 2023
5097fd7
refactor to add dynamic layer
annelo-msft Jan 25, 2023
f2bd846
Add cast operators to JsonDataElement to pass dynamic GetIntProperty …
annelo-msft Jan 25, 2023
b663856
Add support for dynamic nested property access
annelo-msft Jan 25, 2023
cdad822
enable set via dynamic layer
annelo-msft Jan 25, 2023
68827c3
Enable setting nested properties via dynamic layer
annelo-msft Jan 25, 2023
5ba740e
nit
annelo-msft Jan 25, 2023
70e114a
Merge remote-tracking branch 'upstream/main' into jsondata-perfexp1
annelo-msft Jan 26, 2023
77bf7e0
Renames prior to dynamic refactor
annelo-msft Jan 26, 2023
d013932
start adding separate dynamic layer
annelo-msft Jan 26, 2023
c45eaa8
Move dynamic meta object to dyanmic types.
annelo-msft Jan 26, 2023
42543f3
API updates
annelo-msft Jan 26, 2023
70eee2b
todos and nits
annelo-msft Jan 26, 2023
ff6e123
rename test to match types
annelo-msft Jan 26, 2023
e587339
remove outer DynamicJson class
annelo-msft Jan 26, 2023
f43d141
add BindConvert to dynamic layer
annelo-msft Jan 27, 2023
eceaab5
Add BindGetIndex to dynamic layer
annelo-msft Jan 27, 2023
8d4e6ab
save multitarget attempt
annelo-msft Jan 27, 2023
049a820
Add target frameworks to Experimental to allow ifdefs by target frame…
annelo-msft Jan 27, 2023
4fd4f16
Merge remote-tracking branch 'upstream/main' into jsondata-perfexp1
annelo-msft Jan 27, 2023
e3d69c7
Merge branch 'temp_multitarget' into jsondata-perfexp1
annelo-msft Jan 27, 2023
48b0d04
PR feedback; use more efficient Deserialize call when available in Co…
annelo-msft Jan 27, 2023
b69bec5
refactor per PR fb
annelo-msft Jan 27, 2023
f5d701e
Add BindSetIndex to dynamic layer
annelo-msft Jan 27, 2023
5bfd5af
Fix bug in mutable ToString() where changes to descendants weren't ac…
annelo-msft Jan 27, 2023
20cd72e
Fix WriteTo() bug for string elements and add failing test for handli…
annelo-msft Jan 27, 2023
d9c04ea
Handle null values
annelo-msft Jan 27, 2023
3994769
PR fb
annelo-msft Jan 27, 2023
99ce0fd
Add support for floats and longs
annelo-msft Jan 27, 2023
74ccb91
remove HasValue, per pr fb
annelo-msft Jan 27, 2023
5b90d6e
export API changes
annelo-msft Jan 27, 2023
e905fb0
Support adding properties on dynamic member assignments
annelo-msft Jan 28, 2023
2858cba
reshuffle methods around
annelo-msft Jan 28, 2023
9a9d31d
some changes before adding support for IEnumerable
annelo-msft Jan 28, 2023
7edadb4
Add ArrayEnumerator to MutableJsonElement
annelo-msft Jan 31, 2023
fa3db81
missed file; dynamic portion not complete
annelo-msft Jan 31, 2023
5a6ff95
Bug fix to dynamic ArrayEnumerator; foreach over array now passes
annelo-msft Jan 31, 2023
72dafd9
export API and misc test updates
annelo-msft Feb 1, 2023
813d95f
nit; cleanup
annelo-msft Feb 1, 2023
1e0244e
Make MutableJsonDocument serializable
annelo-msft Feb 1, 2023
3fe0203
Make DynamicJson serializable; enable reference semantics for added p…
annelo-msft Feb 1, 2023
42578cb
Make tests pass for net6.0 & net7.0; will address net461 separately
annelo-msft Feb 1, 2023
be7efb4
Fixes for some net461 issues
annelo-msft Feb 2, 2023
0640de2
Fix Add and Set property for net461
annelo-msft Feb 2, 2023
1e7b9fc
Work around BindBinaryOperation in net461; move inline TODOs to GH issue
annelo-msft Feb 2, 2023
f84eed4
Export API
annelo-msft Feb 2, 2023
a29bf14
Merge remote-tracking branch 'upstream/main' into jsondata-perfexp1
annelo-msft Feb 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions sdk/core/Azure.Core.Experimental/src/JsonData.Operators.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public partial class JsonData : IDynamicMetaObjectProvider, IEquatable<JsonData>
/// </summary>
/// <param name="left">The <see cref="JsonData"/> to compare.</param>
/// <param name="right">The <see cref="bool"/> to compare.</param>
/// <returns>False if the given JsonData represents the given string, and false otherwise</returns>
/// <returns>False if the given JsonData represents the given bool, and false otherwise</returns>
public static bool operator !=(JsonData? left, bool right) => !(left == right);

/// <summary>
Expand Down Expand Up @@ -155,7 +155,7 @@ public partial class JsonData : IDynamicMetaObjectProvider, IEquatable<JsonData>
/// </summary>
/// <param name="left">The <see cref="JsonData"/> to compare.</param>
/// <param name="right">The <see cref="int"/> to compare.</param>
/// <returns>False if the given JsonData represents the given string, and false otherwise</returns>
/// <returns>False if the given JsonData represents the given int, and false otherwise</returns>
public static bool operator !=(JsonData? left, int right) => !(left == right);

/// <summary>
Expand Down Expand Up @@ -207,7 +207,7 @@ public partial class JsonData : IDynamicMetaObjectProvider, IEquatable<JsonData>
/// </summary>
/// <param name="left">The <see cref="JsonData"/> to compare.</param>
/// <param name="right">The <see cref="long"/> to compare.</param>
/// <returns>False if the given JsonData represents the given string, and false otherwise</returns>
/// <returns>False if the given JsonData represents the given long, and false otherwise</returns>
public static bool operator !=(JsonData? left, long right) => !(left == right);

/// <summary>
Expand Down Expand Up @@ -255,7 +255,7 @@ public partial class JsonData : IDynamicMetaObjectProvider, IEquatable<JsonData>
return false;
}

return left.Kind == JsonValueKind.String && ((string?)left._value) == right;
return left.Kind == JsonValueKind.String && ((string?)left) == right;
}

/// <summary>
Expand Down Expand Up @@ -286,7 +286,7 @@ public partial class JsonData : IDynamicMetaObjectProvider, IEquatable<JsonData>
return false;
}

return right.Kind == JsonValueKind.String && ((string?)right._value) == left;
return right.Kind == JsonValueKind.String && ((string?)right) == left;
}

/// <summary>
Expand Down
Loading