Skip to content

Commit

Permalink
Deploying to gh-pages from @ b0d073c 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
gregsdennis committed Jun 6, 2024
1 parent 6709c54 commit f556da7
Show file tree
Hide file tree
Showing 15 changed files with 86 additions and 11 deletions.
27 changes: 27 additions & 0 deletions LearnJsonEverything.styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ pre[b-vt8qwrn6xe] {
}

.grid-panel[b-ehorqxe7rc] {
flex: 1 1 auto;
border: solid 1px #CCBCD9;
border-radius: 5px;
padding: 10px !important;
Expand All @@ -188,3 +189,29 @@ pre[b-vt8qwrn6xe] {
margin-left: auto;
margin-right: auto;
}

[role="option"][b-ehorqxe7rc] {
position: relative;
display: block;
align-content: center;
text-align: left;
margin: 2px;
line-height: 1.8em;
cursor: pointer;
}

[role="listbox"]:focus [role="option"].focused[b-ehorqxe7rc],
[role="option"]:hover[b-ehorqxe7rc] {
color: white;
}

.btn-list-option[b-ehorqxe7rc] {
border: none;
background: none;
height: 100%;
width: 100%;
}

ol[b-ehorqxe7rc], ul[b-ehorqxe7rc] {
padding-left: .5rem;
}
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.
6 changes: 3 additions & 3 deletions _framework/blazor.boot.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"mainAssemblyName": "LearnJsonEverything",
"resources": {
"hash": "sha256-JQ5CM1B5spJARPDcatYp4tB7kY+Bn92heF2H6/cW4e0=",
"hash": "sha256-xXM11J02mu0EtcnAJJbTsPCie5IvDz6qWxoDqMh30iU=",
"jsModuleNative": {
"dotnet.native.8.0.6.suuomc2hr0.js": "sha256-YU6M9+jtDVnB8/wtrgIndOstzNh778Ls8g9XnbjorSk="
},
Expand All @@ -24,8 +24,8 @@
"Json.More.dll": "sha256-xr0aE0+HsrvtjruJdaapKt2/DGB0qSUz+xD0XmvawxM=",
"JsonPointer.Net.dll": "sha256-DzV9BEIGNC1mcOpb+JYI2gGXuDG5qg157LjFTnJ6pAE=",
"JsonSchema.Net.dll": "sha256-iCLcArFhOdHD16SQ2km8JXYsJmbv4fa37t+iopIb8+w=",
"LearnJsonEverything.dll": "sha256-HvrJhd+mGzo1IiVo0UzzbyWu1nwr48j2e4mw/L5Vtkc=",
"LearnJsonEverything.Template.dll": "sha256-h9tQf07WSK97QT59NtfbaIhHNf4PbV5/wUfe3e67WvQ=",
"LearnJsonEverything.dll": "sha256-z0eOcCibOdCnRih5ps1C41Y8IOJt2fy7LGMnVrcznE0=",
"LearnJsonEverything.Template.dll": "sha256-yQdcI4zX8mgsHU81Nnkgxm41wZYJZWKxxs8/8tEkSyM=",
"Markdig.dll": "sha256-34Ry04hh+o21Q3VDOJoD0lmCasZYDBsC9CvOeWz3BjI=",
"Markdig.SyntaxHighlighting.dll": "sha256-YEfO9OsS0T4kDjPXOW2pJF8qg62omn4UYMy/C2tcmC4=",
"Microsoft.AspNetCore.Authorization.dll": "sha256-IsV1p8+7qyVgHgqn8Yon3RZfqKDNjdC/kTwzUwtaAlY=",
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.
2 changes: 1 addition & 1 deletion css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ article {
}

.scroll {
overflow-y: auto;
overflow: auto;
}

h1:focus {
Expand Down
4 changes: 0 additions & 4 deletions css/editor.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.editor-input {
height: 600px;
}

.editor-lang-json {
float: right;
padding: 0px 14px;
Expand Down
58 changes: 55 additions & 3 deletions data/lessons/schema.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
- id: 26b6ebca-58e6-4814-86ea-4946d844c9a6
title: Validate a string
instructions: Create a `JsonSchema` object and validate the string instance. Return
the evaluation results.
title: Any string
instructions: |-
Configure the provided `JsonSchemaBuilder` to produce a schema that validates a string instance.
inputTemplate: ''
contextCode: |-
using System;
Expand All @@ -19,8 +19,12 @@
public EvaluationResults Run(JsonObject context)
{
var instance = context["instance"];
var builder = new JsonSchemaBuilder();
/* USER CODE */
var schema = builder.Build();
return schema.Evaluate(instance);
}
}
tests:
Expand All @@ -32,3 +36,51 @@
isValid: false
- instance: false
isValid: false
- id: 26b6ebca-58e6-4814-86ea-4946d844c9a7
title: Number with limits
instructions: |-
Configure the provided `JsonSchemaBuilder` to produce a schema that validates a number instance
that is less than or equal to 10 but greater than 0.
inputTemplate: ''
contextCode: |-
using System;
using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Nodes;
using System.Text.Json.Serialization;
using Json.Schema;
namespace LearnJsonEverything;
public class Lesson : ILessonRunner<EvaluationResults>
{
public EvaluationResults Run(JsonObject context)
{
var instance = context["instance"];
var builder = new JsonSchemaBuilder();
/* USER CODE */
var schema = builder.Build();
return schema.Evaluate(instance);
}
}
tests:
- instance: 6.8
isValid: true
- instance: 10
isValid: true
- instance: 42e-6
isValid: true
- instance: -5.1
isValid: false
- instance: 0
isValid: false
- instance: a string value
isValid: false
- instance: []
isValid: false
- instance: {}
isValid: false
- instance: false
isValid: false

0 comments on commit f556da7

Please sign in to comment.