@Data, ToJson(), FromJson(), fix a nullability annotation - #6
Merged
Conversation
added 4 commits
September 1, 2026 13:37
Assisted-by: Claude:claude-fable-5
liammclennan
reviewed
Sep 1, 2026
| return JsonValue.Create(Uri.EscapeDataString(value)); | ||
| } | ||
|
|
||
| public static EvaluationResult ToJson(JsonNode? value) |
Author
There was a problem hiding this comment.
JsonNode? is the object type - i.e. you might get a JsonArray etc. there. The function converts whatever object it's given into a raw JSON string 👍
liammclennan
reviewed
Sep 1, 2026
| tojson('a') ⇶ '"a"' | ||
| tojson(true) ⇶ 'true' | ||
| tojson(null) ⇶ 'null' | ||
| tojson(undefined()) ⇶ undefined() |
Author
There was a problem hiding this comment.
👍 that's the convention we've used for some time in these tests; we could use undefined the ambient property, but it's possible (though unlikely) there could be an event property called, literally, undefined. Because we control the set of available functions, undefined() is safer - it's never defined, and data can't bring new functions into existence. A bit wishy-washy, I know :)
liammclennan
approved these changes
Sep 1, 2026
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.
Minimal gaps that affect the
seqclimove.It's significantly easier to write built-in functions using the new data model, so we might do well to run over https://datalust.co/docs/scalar-functions in the near future and fill in a few more.