Skip to content

Commit

Permalink
Deploying to gh-pages from @ 4139e6e 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
gregsdennis committed Jun 14, 2024
1 parent 2e6484c commit 2376d89
Show file tree
Hide file tree
Showing 21 changed files with 635 additions and 1,098 deletions.
Binary file modified _framework/LearnJsonEverything.Template.dll
Binary file not shown.
Binary file modified _framework/LearnJsonEverything.Template.dll.br
Binary file not shown.
Binary file modified _framework/LearnJsonEverything.Template.dll.gz
Binary file not shown.
Binary file modified _framework/LearnJsonEverything.Template.pdb.gz
Binary file not shown.
Binary file modified _framework/LearnJsonEverything.dll
Binary file not shown.
Binary file modified _framework/LearnJsonEverything.dll.br
Binary file not shown.
Binary file modified _framework/LearnJsonEverything.dll.gz
Binary file not shown.
Binary file modified _framework/LearnJsonEverything.pdb.gz
Binary file not shown.
Binary file removed _framework/Yaml2JsonNode.dll
Binary file not shown.
Binary file removed _framework/Yaml2JsonNode.dll.br
Binary file not shown.
Binary file removed _framework/Yaml2JsonNode.dll.gz
Binary file not shown.
Binary file removed _framework/YamlDotNet.dll
Binary file not shown.
Binary file removed _framework/YamlDotNet.dll.br
Binary file not shown.
Binary file removed _framework/YamlDotNet.dll.gz
Binary file not shown.
10 changes: 4 additions & 6 deletions _framework/blazor.boot.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"mainAssemblyName": "LearnJsonEverything",
"resources": {
"hash": "sha256-w7ITSZhTnHV/wOlD2w4FuHrTIY3V+jcsRyO0pZ+6m7E=",
"hash": "sha256-MN4dVUbye4Xmo934Zh43MdLn8PLchPiy2MWICPXSN20=",
"jsModuleNative": {
"dotnet.native.8.0.6.suuomc2hr0.js": "sha256-YU6M9+jtDVnB8/wtrgIndOstzNh778Ls8g9XnbjorSk="
},
Expand All @@ -26,8 +26,8 @@
"JsonPointer.Net.dll": "sha256-DzV9BEIGNC1mcOpb+JYI2gGXuDG5qg157LjFTnJ6pAE=",
"JsonSchema.Net.dll": "sha256-fMEcBvXYh4ic/8yueXWxpfstkwPxuvnMxBURilBRSGs=",
"JsonSchema.Net.Generation.dll": "sha256-aDlPhUJpakh/shP07s4bku0qAYIWxEhynuIe8ihu3Bs=",
"LearnJsonEverything.dll": "sha256-AZB1ioiSFsTEQwDUtxdcx1m3D/HifI+qEPsH2kBF294=",
"LearnJsonEverything.Template.dll": "sha256-y6KYKmuqI+U7u3b4i+G20pc8kcWERcOjgdDuS737UsY=",
"LearnJsonEverything.dll": "sha256-i7x5zGjsiBu9rRMK6JuCK6h79cJLpIyiS2GRt0XlNU8=",
"LearnJsonEverything.Template.dll": "sha256-yYA8d9+KIFKSbHF9J5ZIz32723Ym+eyWvzQn51ENviw=",
"Markdig.dll": "sha256-34Ry04hh+o21Q3VDOJoD0lmCasZYDBsC9CvOeWz3BjI=",
"Markdig.SyntaxHighlighting.dll": "sha256-YEfO9OsS0T4kDjPXOW2pJF8qg62omn4UYMy/C2tcmC4=",
"Microsoft.AspNetCore.Authorization.dll": "sha256-IsV1p8+7qyVgHgqn8Yon3RZfqKDNjdC/kTwzUwtaAlY=",
Expand Down Expand Up @@ -224,9 +224,7 @@
"System.Xml.XmlSerializer.dll": "sha256-ETFo7u3oNBdMiwNq1yqc6xgIAhaB2j2AG7Kr/9RPYeY=",
"System.Xml.XPath.dll": "sha256-w3qjiDoP64PgitB670Dj1NzjzSC+cmRFs1Uvst/824k=",
"System.Xml.XPath.XDocument.dll": "sha256-MYYAc3R8VBaqBpkTmQwhLYNo1HyDXaJ5qPaq766+ESs=",
"WindowsBase.dll": "sha256-yPnQk+d3uYUgH/dOQnp8Zi01c/0FEd03HNQObYUSApE=",
"Yaml2JsonNode.dll": "sha256-g8nALLYqTCnB9FNx9nfkI13LSGX3eP6GlhjclMNNltk=",
"YamlDotNet.dll": "sha256-+PzU2HB0SNWS2sTrD9jJrCxaqBWnChM+YPP8JavSHS0="
"WindowsBase.dll": "sha256-yPnQk+d3uYUgH/dOQnp8Zi01c/0FEd03HNQObYUSApE="
},
"satelliteResources": {
"cs": {
Expand Down
Binary file modified _framework/blazor.boot.json.br
Binary file not shown.
Binary file modified _framework/blazor.boot.json.gz
Binary file not shown.
60 changes: 60 additions & 0 deletions data/lessons/path.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
[
{
"id": "26b6ebca-58e6-4814-86ea-494ed844c9a8",
"skip": false,
"title": "Parsing",
"background": "JSON Path is a syntax for querying JSON data.\n\n_JsonPath.Net_ provides an implementation that conforms to the official IETF\nspecification, [RFC 9535](https://www.rfc-editor.org/rfc/rfc9535.html). Like the other\nguides on this site, this guide will teach you how to use the library _JsonPath.Net_.\n\nHowever, because there are so few implementations of the RFC, and little to no\ndocumentation of it, this guide will also teach you the features of JSON Path itself,\nas described by the RFC.\n\nWe'll start with the library since there is less to cover, then we'll move on to\nwhat you can do with it.\n\nUnlike JSON Schema, JSON Logic, or other technologies that are actually represented in\nJSON, JSON Path is its own syntax, so it must usually be parsed. The primary way to\nparse a path is using the static `JsonPath.Parse()` method.\n",
"docs": "path/basics",
"api": null,
"schemaDocs": null,
"instructions": "Parse the given JSON Path text into a `path` variable.\n",
"contextCode": "using System.Text.Json;\nusing System.Text.Json.Nodes;\nusing Json.Path;\n\nnamespace LearnJsonEverything;\n\npublic class Lesson : ILessonRunner<PathResult>\n{\n public PathResult Run(JsonObject test)\n {\n var data = test[\"data\"];\n var pathText = \"$.foo.bar\";\n\n /* USER CODE */\n\n return path.Evaluate(data);\n }\n}",
"tests": [
{
"data": {
"foo": {
"bar": "a string"
}
},
"result": [
"a string"
]
}
],
"solution": "using System.Text.Json;\nusing System.Text.Json.Nodes;\nusing Json.Path;\n\nnamespace LearnJsonEverything;\n\npublic class Lesson : ILessonRunner<PathResult>\n{\n public PathResult Run(JsonObject test)\n {\n var data = test[\"data\"];\n var pathText = \"$.foo.bar\";\n\n var path = JsonPath.Parse(pathText);\n\n return path.Evaluate(data);\n }\n}"
},
{
"id": "bee48c06-4b02-4e2a-9dd7-97eb1c25e7d1",
"skip": false,
"title": "Parsing Safely",
"background": "Unlike JSON Schema, JSON Logic, or other technologies that are actually represented in\r\nJSON, JSON Path is its own syntax, so it must usually be parsed. The primary way to\r\nparse a path is using the static `JsonPath.Parse()` method, but this can throw exceptions when the path string is not valid.\r\n\r\nIf you want to avoid an exception, `JsonPath.TryParse()` exists to parse a path string in a way that does not throw an exception.",
"docs": "path/basics/#path-in-code",
"api": null,
"schemaDocs": null,
"instructions": "Change the code to safely parse the text. Return null if parsing fails.",
"contextCode": "using System.Text.Json;\r\nusing System.Text.Json.Nodes;\r\nusing Json.Path;\r\n\r\nnamespace LearnJsonEverything;\r\n\r\npublic class Lesson : ILessonRunner<PathResult>\r\n{\r\n public PathResult Run(JsonObject test)\r\n {\r\n var data = test[\"data\"];\r\n var pathText = test[\"pathText\"].GetValue<string>();\r\n\r\n var path = JsonPath.Parse(pathText);\r\n\r\n return path.Evaluate(data);\r\n }\r\n}",
"tests": [
{
"data": {
"foo": {
"bar": "a string"
}
},
"pathText": "$['foo'].bar",
"result": [
"a string"
]
},
{
"data": {
"foo": {
"bar": "a string"
}
},
"pathText": "$.['foo'].bar",
"result": null
}
],
"solution": "using System.Text.Json;\r\nusing System.Text.Json.Nodes;\r\nusing Json.Path;\r\n\r\nnamespace LearnJsonEverything;\r\n\r\npublic class Lesson : ILessonRunner<PathResult>\r\n{\r\n public PathResult Run(JsonObject test)\r\n {\r\n var data = test[\"data\"];\r\n var pathText = test[\"pathText\"].GetValue<string>();\r\n\r\n if (!JsonPath.TryParse(pathText, out var path))\r\n {\r\n return null;\r\n }\r\n\r\n return path.Evaluate(data);\r\n }\r\n}"
}
]
64 changes: 0 additions & 64 deletions data/lessons/path.yaml

This file was deleted.

Loading

0 comments on commit 2376d89

Please sign in to comment.