-
Notifications
You must be signed in to change notification settings - Fork 5
Add .NET 6 JsonNode support #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Maybe someone capable can add the .NET 6 sdk to the github workflow? |
Hello @rmja
Thanks for the PR! I will add .NET 6 to the workflow later this week. |
Has anyone had a chance to look at this? |
@zjklee Have you had a chance to go through this? |
ping... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be reviewed after #10 has been merged as will likely need conflicts to be resolved.
Handlebars.Create(new HandlebarsConfiguration().UseJson()) | ||
(Handlebars.Create(new HandlebarsConfiguration().UseJson()), json => JsonDocument.Parse(json)), | ||
#if NET6_0_OR_GREATER | ||
(Handlebars.Create(new HandlebarsConfiguration().UseJson()), json => System.Text.Json.Nodes.JsonNode.Parse(json)), | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this still be needed if we bumped system.text.json to v6?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bumping STJ package to v6 will eliminate the need for this conditional code.
@@ -0,0 +1,31 @@ | |||
#if NET6_0_OR_GREATER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed if STJ is bumped to v6?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bumping STJ package to v6 will eliminate the need for this conditional code.
@@ -0,0 +1,172 @@ | |||
#if NET6_0_OR_GREATER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed if STJ is bumped to v6?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bumping STJ package to v6 will eliminate the need for this conditional code.
@@ -0,0 +1,47 @@ | |||
#if NET6_0_OR_GREATER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed if STJ is bumped to v6?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bumping STJ package to v6 will eliminate the need for this conditional code.
@@ -0,0 +1,44 @@ | |||
#if NET6_0_OR_GREATER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed if STJ is bumped to v6?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bumping STJ package to v6 will eliminate the need for this conditional code.
@@ -0,0 +1,48 @@ | |||
#if NET6_0_OR_GREATER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed if STJ is bumped to v6?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bumping STJ package to v6 will eliminate the need for this conditional code.
|
Merge conflicts exist but should wait for #10 to be merged first. |
Improve none net 6 behavior
@thompson-tomo merged:) |
This PR adds support for
System.Text.Json.Nodes.JsonNode
as model.It is similar to the
JsonElement
implementation, but allows e.g. for case insensitive lookup as described in Handlebars-Net/Handlebars.Net#491 (comment)