15 #ifndef INCLUDE_NN_NLIB_MSGPACK_JSONSCHEMA_H_ 16 #define INCLUDE_NN_NLIB_MSGPACK_JSONSCHEMA_H_ 22 #include "nn/nlib/Swap.h" 24 #if defined(_MSC_VER) && defined(nx_msgpack_EXPORTS) 25 #undef NLIB_VIS_PUBLIC 26 #define NLIB_VIS_PUBLIC NLIB_WINEXPORT 31 class JsonSchemaValidatorPrivate;
54 JsonSchemaValidatorPrivate* prv_;
60 encode_description(
false),
69 class JsonSchemaConverterPrivate;
92 return Init(settings);
95 Result Convert(const
char* uri, Detail* detail)
NLIB_NOEXCEPT;
100 return Export(written, &buf[0], N);
102 #ifdef __cpp_rvalue_references 103 std::tuple<Result, std::unique_ptr<nlib_byte_t[]>,
size_t> Export() const
NLIB_NOEXCEPT;
107 JsonSchemaConverterPrivate* prv_;
114 NLIB_DEFINE_STD_SWAP(::nlib_ns::msgpack::JsonSchemaConverter)
115 NLIB_DEFINE_STD_SWAP(::nlib_ns::msgpack::JsonSchemaValidator)
117 #if defined(_MSC_VER) && defined(nx_msgpack_EXPORTS) 118 #undef NLIB_VIS_PUBLIC 119 #define NLIB_VIS_PUBLIC NLIB_WINIMPORT 121 #endif // INCLUDE_NN_NLIB_MSGPACK_JSONSCHEMA_H_ ~JsonSchemaValidator() noexcept
Destructor.
#define NLIB_DISALLOW_COPY_AND_ASSIGN(TypeName)
Prohibits use of the copy constructor and assignment operator for the class specified by TypeName...
Result
The result of the function executed.
Failed while reading the file.
JsonStreamParserSettings parser_settings
This setting is provided to parse JSON Schema.
bool encode_description
As of now, this variable is ignored.
constexpr JsonSchemaConverter() noexcept
Instantiates the object with default parameters (default constructor).
Specifies options for operating JsonSchemaConverter.
Result
The result of the function executed.
Object created when MessagePack or JSON is read.
An error occurred in processing the URI.
bool encode_title
As of now, this variable is ignored.
~JsonSchemaConverter() noexcept
Destructor.
Data structure used to store the JsonStreamParser settings parameters.
Object created when MessagePack, JSON, or CSV is read.
The classes for parsing JSON or MessagePack have been defined.
Failed to allocate memory.
If the validation with JSON Schema has failed, a string representing the location where the validatio...
The class for getting the native path string from the URI path notation that is not machine-dependent...
The validation with JSON Schema has failed.
Converts JSON Schema to a byte-code format available for JsonSchemaValidator.
#define NLIB_NOEXCEPT
Defines noexcept geared to the environment, or the equivalent.
Result Init() noexcept
A parameter omitted version of the above function which passes settings as the default value...
#define NLIB_CEXPR
Defines constexpr if it is available for use. If not, holds an empty string.
The specified file could not be found.
Failed to allocate memory.
const NativePathMapper * uri_mapper
Sets the pointer to an object that is to be used to convert a URI to a file path. You can specify NUL...
Defines the class for getting the platform-specific path notation from the URI path notation...
#define NLIB_FINAL
Defines final if it is available for use. If not, holds an empty string.
If the conversion of JSON Schema has failed, a string representing the location where the conversion ...
These classes are used to validate JSON and msgpack using JSON Schema.
constexpr JsonSchemaValidator() noexcept
Instantiates the object with default parameters (default constructor).