High-performance, low-allocating JSON object diff and patch extension for System.Text.Json. Support generating patch document in RFC 6902 JSON Patch format.
The benchmarks are confusing as it only compares JToken with JsonNode in readonly mode.
With when comparing JsonNode in readonly mode, we only have two options:
Raw text (based on string comparison)
Semantic (materialize JsonElement in DeepEquals and JsonValueComparer)
With RawText mode, it is not expected to output the same result as JToken comparison which is semantic only. Therefore, the benchmarks to compare those two are confusing.
With Semantic mode, it is expected the comparison of JsonNode to be slower than JToken comparison as the materialize processing can happen multiple times during comparison (currently a design to keep memory allocation low). This should ideally be evaluated so that we could refer to the result when improving in this area. We should also add benchmarks for comparing materialized JsonNodes, and compare the benchmark results with JToken comparison, so that it shows the algorithm level benchmarking results. This should not include JSON parsing.
The actions:
[x] Remove JToken vs readonly JsonNode with RawText option benchmarks
[x] Add/revise JToken vs readonly JsonNode with Semantic option benchmarks
[x] Add/revise JsonNode with different options benchmarks
The benchmarks are confusing as it only compares
JToken
withJsonNode
in readonly mode.With when comparing
JsonNode
in readonly mode, we only have two options:JsonElement
inDeepEquals
andJsonValueComparer
)With
RawText
mode, it is not expected to output the same result asJToken
comparison which is semantic only. Therefore, the benchmarks to compare those two are confusing.With
Semantic
mode, it is expected the comparison ofJsonNode
to be slower thanJToken
comparison as the materialize processing can happen multiple times during comparison (currently a design to keep memory allocation low). This should ideally be evaluated so that we could refer to the result when improving in this area. We should also add benchmarks for comparing materializedJsonNode
s, and compare the benchmark results withJToken
comparison, so that it shows the algorithm level benchmarking results. This should not include JSON parsing.The actions:
JToken
vs readonlyJsonNode
withRawText
option benchmarksJToken
vs readonlyJsonNode
withSemantic
option benchmarksJsonNode
with different options benchmarks