| | | 1 | | using System.Text.Json; |
| | | 2 | | |
| | | 3 | | namespace ArturRios.Util.Http; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// The <see cref="JsonSerializerOptions"/> shared by everything in this namespace. |
| | | 7 | | /// </summary> |
| | | 8 | | /// <remarks> |
| | | 9 | | /// Property matching is case insensitive so that a server answering in camelCase binds to PascalCase |
| | | 10 | | /// members without per-call configuration, which is also how Newtonsoft.Json behaved before this library |
| | | 11 | | /// moved to <see cref="System.Text.Json"/>. Serialization keeps member names exactly as declared. |
| | | 12 | | /// </remarks> |
| | | 13 | | internal static class JsonDefaults |
| | | 14 | | { |
| | | 15 | | /// <summary> |
| | | 16 | | /// Options used by <see cref="HttpExtensions"/> and <see cref="HttpOutput{TBody}"/>. |
| | | 17 | | /// </summary> |
| | 1 | 18 | | internal static readonly JsonSerializerOptions Options = new() |
| | 1 | 19 | | { |
| | 1 | 20 | | PropertyNameCaseInsensitive = true |
| | 1 | 21 | | }; |
| | | 22 | | } |