Audit fixes#383
Merged
Merged
Conversation
Correctness: - DefaultJsonNameTable.Add: lock a dedicated object, not the entries array that Grow() replaces (mutual exclusion broke across a table resize) - JTokenWriter: add missing WriteValue/WritePropertyName(CharSpan) overrides (span writes silently corrupted the token tree) - JsonPath: '&&' now binds tighter than '||' (RFC 9535). BREAKING: changes results for mixed-operator filters; updated the pinned FilterExistWithAndOr test - JsonTextWriter: add WriteComment/WriteWhitespace(CharSpan) overrides - JTokenWriter: WriteValue((byte[])null)/((Uri)null) now writes a single null - DefaultContractResolver: Fields mode includes inherited private fields - ImmutableCollectionsUtils: IImmutableQueue<> maps to concrete ImmutableQueue<> - JContainer copy ctor: copy line info from the source, not the fresh clone - JsonPath: malformed paths throw JsonException, not IndexOutOfRangeException; '&&||' is rejected; '=~' without slashes throws at parse time - JsonTextReader: reject bufferSize <= 0 - Converters: non-string tokens reported with JSON position info; PathInfoConverter no longer drops non-string tokens to null - TryGetImmutableConstructor: try all constructors instead of aborting on the first - DefaultContractResolver.Converters: expose as IReadOnlyList. BREAKING: no longer a mutable List - JValue: char- and string-backed String values hash consistently Performance: - JavaScriptUtils/JsonPosition: return the pooled escape buffer; size StringWriter for delimiters - CamelCasePropertyNamesContractResolver: struct cache key (0 alloc per probe, 2x faster) - EnumUtils: cache the enum underlying type code on EnumInfo - BooleanQueryExpression: parse the =~ regex once at construction - FSharpMapConverter: wrap the map in a ReadOnlyDictionary view instead of copying Tests and benchmarks: - AuditFindingsTests + JPath parse-error tests (regression tests per fix) - AuditPerfBenchmarks; Benchmark.Tests retargeted to net10.0
This was referenced Jul 13, 2026
This was referenced Jul 13, 2026
Open
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.