Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
95ff624
Add ability to inject and read additional properties for IJsonModels
m-nash Jul 22, 2025
58c4e54
Makes the ValueKind a flag
m-nash Jul 22, 2025
9bb933b
more progress / pr fb
m-nash Jul 24, 2025
0bc5e9c
extract ByteArrayEqualityComparer to its own file
m-nash Jul 24, 2025
18a39ff
more coverage for arrays and anon models
m-nash Jul 24, 2025
c15a081
add more coverage for arrays for unknown scenarios
m-nash Jul 25, 2025
2fa1817
refactor classes
m-nash Jul 25, 2025
93a6194
add the rest of jsonpointer and some test cases for it
m-nash Jul 25, 2025
33b1b23
switch to JsonPath and add more array cases
m-nash Jul 29, 2025
97076cd
Make advancing utf8jsonreader based on path generic for set, add, get…
m-nash Jul 29, 2025
ee1bd24
refactor for jsonpath and add first dictionary tests
m-nash Aug 1, 2025
5670a5c
various perf improvements
m-nash Aug 4, 2025
5d998d3
refactor and fix a test
m-nash Aug 4, 2025
be312c5
Add more test cases to hand dictionary and root array cases
m-nash Aug 4, 2025
af14401
Finish more of the common scenarios
m-nash Aug 4, 2025
a4411d5
update api
m-nash Aug 4, 2025
b2893b8
fix aot warnings
m-nash Aug 4, 2025
979f6ba
refactor / simplify jsonpathreader and add some unit tests
m-nash Aug 5, 2025
e7ae881
Add comparer that uses jsonreader tokens to normalize how to write th…
m-nash Aug 6, 2025
5df8dee
remove temp code
m-nash Aug 6, 2025
fc7bb71
target net9.0 to use some new features for perf
m-nash Aug 7, 2025
95ecad8
Propagate on set / get to improve performance
m-nash Aug 8, 2025
87657ae
update api
m-nash Aug 8, 2025
e1c0998
refactor alternate key usage
m-nash Aug 8, 2025
fa90f6f
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
m-nash Aug 8, 2025
f3eb1b4
update api after merge
m-nash Aug 8, 2025
443ec57
Finish array insert tests and start on AP solo usage
m-nash Aug 8, 2025
c866f63
merge main
m-nash Aug 12, 2025
800ba0f
Make AP experimental
m-nash Aug 13, 2025
0fba353
update api
m-nash Aug 13, 2025
1703e92
Add more coverage for jsonpathreader handling of special characters i…
m-nash Aug 13, 2025
a333eeb
normalize jsonPaths
m-nash Aug 13, 2025
6ca8a26
optimize dictionary member lookup
m-nash Aug 14, 2025
e9f7cc2
rename to JsonPatch
m-nash Aug 18, 2025
858f485
Hide all members on EncodedValue
m-nash Aug 18, 2025
569e065
update property names
m-nash Aug 18, 2025
0fe0991
remove normalization loophole in byte[] path
m-nash Aug 19, 2025
acd11e6
normalize with dot in property name
m-nash Aug 19, 2025
6914095
Add Append and drop custom jsonPath for array insert
m-nash Aug 19, 2025
abdadab
update on json projection
m-nash Aug 20, 2025
fea1bdd
fix net8 tests
m-nash Aug 20, 2025
121a500
Add more coverage for single dim arrays
m-nash Aug 22, 2025
e36faa4
more append coverage
m-nash Aug 24, 2025
321de81
add more unit tests around jsonpathreaderextensions
m-nash Aug 25, 2025
b800057
Add test for out of order inserts
m-nash Aug 25, 2025
0eef89a
minor cleanup
m-nash Aug 25, 2025
7c91347
update api and experimental attribute
m-nash Aug 25, 2025
d56d513
add Get/Set/TryGet overloads
m-nash Aug 25, 2025
aac8e70
merge main
m-nash Aug 25, 2025
d0783c3
Add SCME to cspell
m-nash Aug 25, 2025
a40632b
expand tests for set and add append overloads / tests
m-nash Aug 27, 2025
d688a7b
clean up some extension methods
m-nash Aug 27, 2025
215739e
Add tests for remaining public / internal JsonPathReaderExtensions
m-nash Aug 28, 2025
c622e51
add serialize extension and rename Write methods
m-nash Aug 29, 2025
41c10e9
update tests to use serialize method
m-nash Aug 29, 2025
043189a
Add ability to write as application/json-patch+json
m-nash Aug 29, 2025
0e74e91
add tests with model usage for JsonPatch.ToString
m-nash Sep 5, 2025
c245af6
Drop serialize extension
m-nash Sep 5, 2025
4d7dcc4
rename ContainsChildOf to be an overload of Contains
m-nash Sep 5, 2025
9e39678
Drop write array to and use the writeto overload that takes a subpath
m-nash Sep 5, 2025
d3dd835
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
m-nash Sep 5, 2025
acc5aeb
regen api
m-nash Sep 5, 2025
bea0aec
minor clean up
m-nash Sep 5, 2025
8cbd4a6
refactor for readability
m-nash Sep 5, 2025
73f976d
refactor normalization in get array path
m-nash Sep 5, 2025
c1bc38a
remove magic numbers for utf8 format buffers
m-nash Sep 5, 2025
9cc9efa
update api
m-nash Sep 5, 2025
f95776d
pr feedback
m-nash Sep 8, 2025
bfef91b
pr feedback
m-nash Sep 8, 2025
d7c606b
Rename TryGetRawValue
m-nash Sep 9, 2025
f021032
Drop is flattened propagator
m-nash Sep 9, 2025
6afd4bf
pr feedback
m-nash Sep 9, 2025
75b9601
move helper to helper class
m-nash Sep 9, 2025
85ec5ba
refactor encoding and decoding
m-nash Sep 16, 2025
6653cfc
update to fix netstandard2.0 test cases
m-nash Sep 16, 2025
90ac585
update api
m-nash Sep 16, 2025
e507abe
remove extension methods
m-nash Sep 17, 2025
c751ec7
escape special characters in jsonpointer conversion
m-nash Sep 17, 2025
2fd41c7
cleanup unused
m-nash Sep 17, 2025
4421fb5
refactor append impl
m-nash Sep 17, 2025
4644ecd
fill in more tests for Remove
m-nash Sep 17, 2025
154dd07
remove unused append parsing
m-nash Sep 17, 2025
5b53716
add more coverage for edge cases
m-nash Sep 17, 2025
200d6cb
Add additional tests for Removing Json
m-nash Sep 18, 2025
290f255
Add more use cases for testing
m-nash Sep 18, 2025
19da4f2
Fill in rest of coverage for JsonPatch
m-nash Sep 18, 2025
89a1a16
Fill in JsonPathComparer coverage
m-nash Sep 18, 2025
ac47b61
fix a framework assert and add some additiona JsonPathExtensions cove…
m-nash Sep 19, 2025
abf3713
merge main
m-nash Sep 22, 2025
d4b9bf7
more coverage for Advance
m-nash Sep 22, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ namespace Azure.Core.Tests.ModelReaderWriterTests.Models
[PersistableModelProxy(typeof(UnknownBaseModel))]
public abstract class BaseModel : IUtf8JsonSerializable, IJsonModel<BaseModel>
Comment thread
m-nash marked this conversation as resolved.
{
private Dictionary<string, BinaryData> _rawData;
private Dictionary<string, BinaryData> _serializedAdditionalRawData;
Comment thread
m-nash marked this conversation as resolved.

protected internal BaseModel(Dictionary<string, BinaryData> rawData)
{
_rawData = rawData ?? new Dictionary<string, BinaryData>();
_serializedAdditionalRawData = rawData ?? new Dictionary<string, BinaryData>();
}

public string Kind { get; internal set; }
Expand All @@ -25,7 +25,7 @@ protected internal BaseModel(Dictionary<string, BinaryData> rawData)
protected internal void SerializeRawData(Utf8JsonWriter writer)
{
//write out the raw data
foreach (var property in _rawData)
foreach (var property in _serializedAdditionalRawData)
Comment thread
m-nash marked this conversation as resolved.
{
writer.WritePropertyName(property.Key);
#if NET6_0_OR_GREATER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Azure.Core.Tests.ModelReaderWriterTests.Models
/// <summary> The InputAdditionalPropertiesModelStruct. </summary>
public readonly partial struct ModelAsStruct : IUtf8JsonSerializable, IJsonModel<ModelAsStruct>, IJsonModel<object>
{
private readonly Dictionary<string, BinaryData> _rawData;
private readonly Dictionary<string, BinaryData> _serializedAdditionalRawData;

/// <summary> Initializes a new instance of InputAdditionalPropertiesModelStruct. </summary>
/// <param name="id"></param>
Expand All @@ -24,7 +24,7 @@ namespace Azure.Core.Tests.ModelReaderWriterTests.Models
public ModelAsStruct(int id, Dictionary<string, BinaryData> rawData)
{
Id = id;
_rawData = rawData;
_serializedAdditionalRawData = rawData;
}

/// <summary> Gets the id. </summary>
Expand All @@ -41,9 +41,9 @@ private void Serialize(Utf8JsonWriter writer, ModelReaderWriterOptions options)
writer.WriteStartObject();
writer.WritePropertyName("id"u8);
writer.WriteNumberValue(Id);
if (_rawData is not null && options.Format == "J")
if (_serializedAdditionalRawData is not null && options.Format == "J")
{
foreach (var property in _rawData)
foreach (var property in _serializedAdditionalRawData)
{
writer.WritePropertyName(property.Key);
#if NET6_0_OR_GREATER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ internal static Dictionary<string, BinaryData> GetRawData(object model)
{
modelType = modelType.BaseType;
}
var propertyInfo = modelType.GetField("_rawData", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
var propertyInfo = modelType.GetField("_serializedAdditionalRawData", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
return propertyInfo.GetValue(model) as Dictionary<string, BinaryData>;
}

Expand Down
Loading
Loading