# NameGeneratorSerializer

A convenience class for reading and writing a [NameGenerator](/syllabore/class-docs/namegenerator.md) to disk and back.

## Constructors

| Constructor               | Description                                                                                                                |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| NameGeneratorSerializer() | Initializes a new [NameGeneratorSerializer](/syllabore/class-docs/namegeneratorserializer.md) with basic encoder settings. |

## Methods

| Method                                                                                               | Returns                                                 | Description                                                                                                                                                                                                                           |
| ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Deserialize(System.String filepath)                                                                  | [NameGenerator](/syllabore/class-docs/namegenerator.md) | Reads a json file and turns it into a [NameGenerator](/syllabore/class-docs/namegenerator.md). This method expects the json file to have been written by the *Syllabore.Json.NameGeneratorSerializer.Serialize* method of this class. |
| Serialize([NameGenerator](/syllabore/class-docs/namegenerator.md) generator, System.String filepath) | System.Void                                             | Writes the specified [NameGenerator](/syllabore/class-docs/namegenerator.md) to a json file.                                                                                                                                          |

## Properties

| Property        | Type                                          | Description                                               |
| --------------- | --------------------------------------------- | --------------------------------------------------------- |
| EncoderSettings | System.Text.Encodings.Web.TextEncoderSettings | Allows characters and unicode ranges.                     |
| WriteIndented   | System.Boolean                                | If true, json output will be indented and easier to read. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sacro.gitbook.io/syllabore/class-docs/namegeneratorserializer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
