Skip to content

Commit

Permalink
update link (again) (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregsdennis committed Oct 26, 2024
1 parent 7006739 commit 7fc9aee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _posts/2024/2024-10-26-a-common-problem.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ In this post I'm going to review what is arguably the most common of these cases

All of the `json-everything` libraries operate on the `JsonNode` family of models from _System.Text.Json_. These models offer a remarkable feature that makes inlining JSON data very simple: implicit casts into `JsonValue` from compatible .Net types.

So, C# `bool` maps to the `true` and `false` JSON literals, [`null` maps to the `null` JSON literal](../2023/2023-04-20-null-has-value-too.md), `double` and all of the other numeric types map to JSON numbers, and `string` maps to JSON strings. That means the compiler considers all of the following code as valid and performs the appropriate conversion in the background:
So, C# `bool` maps to the `true` and `false` JSON literals, [`null` maps to the `null` JSON literal](/posts/null-has-value-too), `double` and all of the other numeric types map to JSON numbers, and `string` maps to JSON strings. That means the compiler considers all of the following code as valid and performs the appropriate conversion in the background:

```c#
JsonNode jsonBool = false;
Expand Down

0 comments on commit 7fc9aee

Please sign in to comment.