Skip to content

Commit 94e0b1c

Browse files
authored
Update ReadMe.md
1 parent 6cd24d8 commit 94e0b1c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ReadMe.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,8 @@ If none of the above cases apply, `JsonSerializer.Deserialize<T>` is used to per
564564

565565
If you want to change the deserialization options, you can set `JsonSerializerOptions` to `ConsoleApp.JsonSerializerOptions`.
566566

567+
> NOTE: If they are not set when NativeAOT is used, a runtime exception may occur. If they are included in the parsing process, be sure to set source generated options.
568+
567569
### Custom Value Converter
568570

569571
To perform custom binding to existing types that do not support `ISpanParsable<T>`, you can create and set up a custom parser. For example, if you want to pass `System.Numerics.Vector3` as a comma-separated string like `1.3,4.12,5.947` and parse it, you can create an `Attribute` with `AttributeTargets.Parameter` that implements `IArgumentParser<T>`'s `static bool TryParse(ReadOnlySpan<char> s, out Vector3 result)` as follows:

0 commit comments

Comments
 (0)