public final DataModel fromJson ( final InputStream resource ) { ObjectMapper mapper = new ObjectMapper ( ) ; mapper . addMixInAnnotations ( DataType . class , DataTypeConfigMixin . class ) ; mapper . addMixInAnnotations ( ObjectDataType . class , ObjectDataTypeConfigMixin . class ) ; try { return mapper . readValue ( resource , DataModel . class ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } }
Create data model definition from JSON file .