@jsonforms/core package provides the foundation for JSON Forms. It contains all framework-independent functionality including state management, validation, schema resolution, and UI schema testers.
Installation
Key Exports
The core package exports several categories of functionality:Actions
Action creators for managing JSON Forms state:init- Initialize JSON Forms with data, schema, and UI schemaupdate- Update form data at a specific pathsetSchema- Update the JSON schemasetUISchema- Update the UI schemaregisterRenderer- Register a custom renderersetConfig- Set form configuration
Reducers
Redux-compatible reducers for state management:coreReducer- Handles core state (data, schema, validation)jsonFormsReducerConfig- Complete reducer configuration
Testers
Functions to determine which renderer should handle a UI schema element:rankWith- Create a ranked testerisControl- Check if UI schema is a controlschemaTypeIs- Test schema typeformatIs- Test schema formatand,or,not- Compose testers
Utilities
Helper functions for common operations:- Path utilities (
composePaths,toDataPath) - Schema resolution (
resolveSchema,resolveData) - Validation (
createAjv,validate) - Label generation (
createLabelDescriptionFrom) - Runtime evaluation (
isVisible,isEnabled)