|
nfx-serialization 0.3.0
Cross-platform C++ JSON serialization library with extensible trait capabilities
|
JSON Schema generator from Document instances. More...
#include <nfx/serialization/json/SchemaGenerator.h>
Classes | |
| struct | Options |
| Configuration options for schema generation. More... | |
Public Member Functions | |
| SchemaGenerator (const Document &document) | |
| Generate JSON Schema from a single document. | |
| SchemaGenerator (const Document &document, const Options &options) | |
| Generate JSON Schema from a single document. | |
| SchemaGenerator (const std::vector< Document > &documents) | |
| Generate JSON Schema from multiple sample documents. | |
| SchemaGenerator (const std::vector< Document > &documents, const Options &options) | |
| Generate JSON Schema from multiple sample documents. | |
| SchemaGenerator (const SchemaGenerator &)=default | |
| Copy constructor. | |
| SchemaGenerator (SchemaGenerator &&) noexcept=default | |
| Move constructor. | |
| ~SchemaGenerator ()=default | |
| Destructor. | |
| SchemaGenerator & | operator= (const SchemaGenerator &)=default |
| Copy assignment operator. | |
| SchemaGenerator & | operator= (SchemaGenerator &&) noexcept=default |
| Move assignment operator. | |
| const Document & | schema () const noexcept |
| Get the generated schema. | |
JSON Schema generator from Document instances.
Analyzes JSON data to generate JSON Schema Draft 2020-12 compliant schemas. Infers types, detects string formats (email, date, URI, UUID, etc.), and generates constraints based on observed values.
Definition at line 54 of file SchemaGenerator.h.
|
explicit |
Generate JSON Schema from a single document.
| document | The JSON document to analyze |

| nfx::serialization::json::SchemaGenerator::SchemaGenerator | ( | const Document & | document, |
| const Options & | options ) |
Generate JSON Schema from a single document.
| document | The JSON document to analyze |
| options | Generation options |
|
explicit |
Generate JSON Schema from multiple sample documents.
Analyzes multiple samples to infer required properties, detect enums, and generate more accurate constraints.
| documents | Vector of JSON documents to analyze |
| nfx::serialization::json::SchemaGenerator::SchemaGenerator | ( | const std::vector< Document > & | documents, |
| const Options & | options ) |
Generate JSON Schema from multiple sample documents.
Analyzes multiple samples to infer required properties, detect enums, and generate more accurate constraints.
| documents | Vector of JSON documents to analyze |
| options | Generation options |
|
default |
Copy assignment operator.

|
defaultnoexcept |
Move assignment operator.

|
inlinenoexcept |
Get the generated schema.
Definition at line 146 of file SchemaGenerator.h.

