Skip to content

Commit aff2014

Browse files
authored
Merge pull request #18 from gregsdennis/schema/text-representation-note
add note about getting a textual representation
2 parents 5e57447 + ba89998 commit aff2014

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.jekyll-metadata

2.09 KB
Binary file not shown.

_docs/schema/basics.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ There are two options when building a schema: defining it inline using the fluen
4747

4848
## Serialization and Deserialization {#schema-deserialization}
4949

50-
_JsonSchema.Net_ schemas are fully serializable.
50+
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.
51+
52+
To facilitate this, _JsonSchema.Net_ schemas are fully serializable.
5153

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

6264
Done.
6365

66+
> You can either use the JSON serializer as shown above, or the YAML serializer found in [_Yaml2JsonNode_](/yaml/basics/).
67+
{: .prompt-tip}
68+
6469
### Ahead of Time (AOT) compatibility {#aot}
6570

6671
_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.

0 commit comments

Comments
 (0)