Parse a root type from its JSON syntax string and return the corresponding RootType object. Should be able to read strict and relaxed JSON syntax for type definitions, such as: { "key": "Person", "type": "object", "properties": { "name": "string", "age": "number" } } or with relaxed JSON syntax like: { key: 'Person', type: 'object', properties: { name: 'string', age: 'number' } }
The JSON syntax string of the root type to parse.
The parsed RootType object if successful.
StaticisCheck if a given type is an atomic type (string, number, boolean, or date).
the type to check.
true if the type is an atomic type, otherwise false.
StaticisCheck if a given type is an array type (string[], number[], boolean[], or date[]), knowing that Array Object types are also accepted as array types. The loosely typed 'array' is also accepted by this function.
the type to check.
true if the type is an array type, otherwise false.
StaticisCheck if a given type is an object type or the unspecified type 'object'.
the type to check.
true if the type is an object type, otherwise false.
StaticisCheck if a given type is a stringly-typed Object type. The type 'object' is not accepted by this function.
the type to check.
true if the type is a stringly-typed object, otherwise false.
StaticisCheck if a given type is a stringly-type Array of Objects type. The loose type 'array' is not accepted by this function.
the type to check.
true if the type is a stringly-typed Array type, otherwise false.
StaticisCheck if a given type can be used in type definitions as a PropertyType. Any Property type can be used in the type registry.
the type to check.
true if the type can be used in the type regitsyr, otherwise false.
Parser class for parsing type definitions from JSON syntax into RootType objects. This parser is designed to handle type definitions that can include atomic types, array types, complex types (objects), and object array types. The expected syntax for type definitions is JSON-based, where a RootType must have a "key" property and either a "type" or "properties" property. The parser includes validation to ensure that the provided JSON syntax conforms to the expected structure for type definitions. You can use static methods to validate specific type structures (like atomic types, array types, complex types, etc.). This parser is primarily used internally when creating types from syntax, and you should not need to instantiate it directly.