jomg library

Classes

ConversionUtils
A set of utilities for help in converting the JSON
JsonAttribute
Simple helper class to track the info for a JSON attribute type is the Dart type (i.e. String, int, bool, List, Map etc) cast is optional and is used to generate type specific inference for any complex types like List and Map
JsonObjectModelGenerator
JsonObjectModelGenerator takes care of generating the various object models from the json that is found. name is the name of the json file without the extension outputDirectory where the generated models will be put

Enums

ValueType

Functions

build({Map? config}) Future<void>
The main build function This starts the process of converting the found JSON files into Dart class definitions

Exceptions / Errors

JOMGJsonFormatException
Exception thrown when supplied JSON is not correct
JOMGNoOutputDirException
Exception thrown when no jomg output_dir found
JOMGNoSourceFilesException
Exception thrown whenno JSON file in src_dir
JOMGNoSrcDirException
Exception thrown when no jomg src_dir found
JOMGYamlException
Exception thrown when no jomg entry found in pubspec.yaml