Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .jekyll-metadata
Binary file not shown.
7 changes: 6 additions & 1 deletion _docs/schema/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ There are two options when building a schema: defining it inline using the fluen

## Serialization and Deserialization {#schema-deserialization}

_JsonSchema.Net_ schemas are fully serializable.
Serialization is how we convert between the textual representation of JSON Schema and a `JsonSchema` .Net object. In many cases, you'll compose your schemas in separate JSON files and deserialize them into the `JsonSchema` model. However if you [define your schemas in code](#schema-inlining) or [generate them from a type](/schema/schemagen/schema-generation/) you won't have a textual representation of those schemas on hand.

To facilitate this, _JsonSchema.Net_ schemas are fully serializable.

```c#
var mySchema = JsonSchema.FromText(content);
Expand All @@ -61,6 +63,9 @@ var mySchema = JsonSerializer.Deserialize<JsonSchema>(content);

Done.

> You can either use the JSON serializer as shown above, or the YAML serializer found in [_Yaml2JsonNode_](/yaml/basics/).
{: .prompt-tip}

### Ahead of Time (AOT) compatibility {#aot}

_JsonSchema.Net_ v6 includes updates to support [Native AOT applications](https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/). In order to take advantage of this, there are a few things you'll need to do.
Expand Down