Customizable JSON Schema-based forms for Kotlin and Compose

Last update: Aug 1, 2022


Kotlin JSON Forms

Customizable JSON Schema-based forms for Kotlin and Compose

Kotlin Version GitHub release (latest by date) Maven Central

This project aims to reimplement JSON Forms in Kotlin for use in Compose-based applications. Rather than defining its own formats or standards, this repo adopts JSON for form configuration and layout of well-known or standardized formats. Form fields and validation is provided in JSON Schema format, and the way the form is laid out and displayed is through JSON Forms format format. Using JSON as as the form definition gives an easy, portable way to display and dynamically change forms in your application.

This repo aims to support all features of the original JSON Forms library, which is written in Javascript, as well as following similar architectural patterns. For all topic related to the JSON format itself, that library's documentation will be a valid reference for this library.

See the video below for an example form in action:

Untitled.mov

Supported Platforms/Features

Currently, JSON Schema validation is provided by the JVM-only json-kotlin-schema, so is only available for JVM-compatible targets. In following the architecture of the original JSON Forms library, the core functionality is not tied to any particular UI framework, and displaying forms in Compose is an extension on top of the core library.

Kotlin JSON Forms is currently available for Compose on Android and Desktop platforms. Adding support for Compose Web is planned.

Installation

repositories {
    mavenCentral()
}

// for plain JVM or Android projects
dependencies {
    implementation("io.github.copper-leaf:json-forms-core:{{site.version}}")
    implementation("io.github.copper-leaf:json-forms-compose:{{site.version}}")
}

// for multiplatform projects
kotlin {
    sourceSets {
        val commonMain by getting {
            dependencies {
                implementation("io.github.copper-leaf:json-forms-core:{{site.version}}")
                implementation("io.github.copper-leaf:json-forms-compose:{{site.version}}")
            }
        }
    }
}

Documentation

See the website for detailed documentation and usage instructions.

License

Kotlin JSON Forms is licensed under the BSD 3-Clause License, see LICENSE.md.

References and Dependencies

This project depends on the following libraries:

GitHub

https://github.com/copper-leaf/kotlin-json-forms
You might also like...

Kotlin extensions for Moshi, Make every thing you want with Moshi in just one line.

Kotlin extensions for Moshi, Make every thing with square / Moshi in one line.

Nov 21, 2021

Pojson provides Kotlin DSL for building complex jsons in declarative manner.

Pojson is a kotlin library for json prototyping. It brings DSL for building JsonObjectPrototype and JsonArrayPrototype. Prototypes don't reference to any json object/array models.

Jan 4, 2022

A Shopping cart library for Android that allows you add to add items to cart and retrieve at ease using JSONObjects.

Carteasy A Shopping cart library for Android that allows you add to add items to cart and retrieve at ease using JSONObjects. Quick Start Add the foll

Dec 30, 2021

Compose easy forms validation library

Compose EasyForms Focus on building your form UI while the library do the heavy work for you. Features Built in support for most of the Form widgets i

Jul 18, 2022

Android library for auto generating SQL schema and Content provider

Android-AnnotatedSQL Android library for auto generating SQL schema and Content Provider by annotations. You will get a full-featured content provider

Apr 18, 2021

A simple library for validating user input in forms using annotations.

A simple library for validating user input in forms using annotations.

ValidationKomensky for Android A simple library for validating user input in forms using annotations. Features: Validate all views at once and show fe

Jul 14, 2022

Android Material Json Form Wizard is a library for creating beautiful form based wizards within your app just by defining json in a particular format.

Android Material Json Form Wizard is a library for creating beautiful form based wizards within your app just by defining json in a particular format.

Android Json Wizard Android Json Wizard is a library for creating beautiful form based wizards within your app just by defining json in a particular f

Apr 26, 2022

🚀Plugin for Android Studio And IntelliJ Idea to generate Kotlin data class code from JSON text ( Json to Kotlin )

🚀Plugin for Android Studio And IntelliJ Idea to generate Kotlin data class code from JSON text ( Json to Kotlin )

JsonToKotlinClass Hi, Welcome! This is a plugin to generate Kotlin data class from JSON string, in another word, a plugin that converts JSON string to

Aug 12, 2022

Images grid JSON | Сетка изображений JSON

 Images grid JSON | Сетка изображений JSON

Images grid JSON | Сетка изображений JSON Задача Разработать приложение: Приложение должно получать JSON-список ссылок на изображения с сервера по адр

Apr 25, 2022

Dynamic-UI-From-JSON - A Sample Android app to show dynamic UI generation from Json

Dynamic-UI-From-JSON - A Sample Android app to show dynamic UI generation from Json

Dynamic UI from JSON Functionality The app's functionality includes: The app gen

Apr 26, 2022

Quote-App-Kotlin - Quote App Based on MVVM clean architecture getting quote from json file stored in assets

Quotify - Simple Quotes App This app shows the use of ViewModel and ViewModelFac

Apr 14, 2022

Gradle-i18n-plugin is meant for generating a JSON file with internationalized texts, based on a Google Sheet.

Gradle-i18n-plugin is meant for generating a JSON file with internationalized texts, based on a Google Sheet.

Gradle-i18n-plugin Gradle-i18n-plugin is meant for generating a JSON file with internationalized texts, based on a Google Sheet. The plugin assumes th

Oct 11, 2021

Android library for Tesla Authentication based on Tesla JSON API (Unofficial)

TeslaAndroidAuth Lightweight Android library for Tesla SSO Authentication based

Jan 10, 2022

A demo project which demonstrates the work of javax.servlet.Filter capable of escaping / modifying / removing a part of JSON request based on specified criteria.

A demo project which demonstrates the work of javax.servlet.Filter  capable of escaping / modifying / removing a part of JSON request based on specified criteria.

Replace Filter Demo A demo project which demonstrates the work of javax.servlet.Filter capable of escaping / modifying / removing a part of JSON reque

Jan 17, 2022

An Easy-to-use Kotlin based Customizable Modules Collection with Material Layouts by BlackBeared.

An Easy-to-use Kotlin based Customizable Modules Collection with Material Layouts by BlackBeared.

Fusion By BlackBeared An Easy-to-use Kotlin based Customizable Library with Material Layouts by @blackbeared. Features Custom Floating Action Buttons

Mar 4, 2022

DMIV aims to provide a flexible and customizable instrument for automated images moving on display. It provides scroll, gyroscope or time based moving. But you can create your own evaluator.

DMIV aims to provide a flexible and customizable instrument for automated images moving on display. It provides scroll, gyroscope or time based moving. But you can create your own evaluator.

DexMovingImageView DMIV aims to provide a flexible and customizable instrument for automated images moving on display. It provides scroll, gyroscope o

Feb 7, 2022

The most complete and powerful data-binding library and persistence infra for Kotlin 1.3, Android & Splitties Views DSL, JavaFX & TornadoFX, JSON, JDBC & SQLite, SharedPreferences.

Lychee (ex. reactive-properties) Lychee is a library to rule all the data. ToC Approach to declaring data Properties Other data-binding libraries Prop

Jul 16, 2022

The most complete and powerful data-binding library and persistence infra for Kotlin 1.3, Android & Splitties Views DSL, JavaFX & TornadoFX, JSON, JDBC & SQLite, SharedPreferences.

Lychee (ex. reactive-properties) Lychee is a library to rule all the data. ToC Approach to declaring data Properties Other data-binding libraries Prop

Jul 16, 2022

Completely customizable progress based loaders drawn using custom CGPaths written in Swift

Completely customizable progress based loaders drawn using custom CGPaths written in Swift

FillableLoaders Completely customizable progress based loaders drawn using custom CGPaths written in Swift Waves Plain Spike Rounded Demo: Changelog:

Jul 15, 2022
Comments
  • 1. Documentation Invalid Link

    In the project README, you have:

    See the website for detailed documentation and usage instructions.

    However, that link results in a 404. Were you aiming for https://copper-leaf.github.io/kotlin-json-forms/wiki/usage-guide/ instead?

    Reviewed by commonsguy at 2022-07-24 18:14
A modern JSON library for Kotlin and Java.

Moshi Moshi is a modern JSON library for Android and Java. It makes it easy to parse JSON into Java objects: String json = ...; Moshi moshi = new Mos

Aug 13, 2022
Manager of progress using Lottie JSON, compatible for Java and Kotlin.
Manager of progress using Lottie JSON,  compatible for Java and Kotlin.

Progress Lottie IGB Manager of progress using Lottie JSON, compatible for Java and Kotlin. Int Top In Bottom Important Info: To create a raw folder: R

Jul 13, 2022
A lightweight Kotlin DSL to render DSL style Json to String.
A lightweight Kotlin DSL to render DSL style Json to String.

A lightweight Kotlin DSL to render DSL style Json to String.

May 5, 2021
Modern JSON processor with readable Kotlin syntax.

Kq Modern cross-platform JSON processor with readable Kotlin syntax. cat ~/Desktop/bdb.ndjson | kq '.filter{it.bool("muted")}.sortedBy{it.long("size")

Jan 25, 2022
A Java serialization/deserialization library to convert Java Objects into JSON and back

Gson Gson is a Java library that can be used to convert Java Objects into their JSON representation. It can also be used to convert a JSON string to a

Aug 13, 2022
xls2json - Read in Excel file (.xls, .xlsx, .xlsm) and output JSON

xls2json Read in Excel file (.xls, .xlsx, .xlsm) and output JSON. Evaluates formulas where possible. Preserve type information from Excel via JSON typ

May 10, 2022
Simple CLI app to convert XML retrieved from a configurable URI to JSON and back

XmlToJsonUtility Simple CLI app written in Kotlin (1.5.31) on Java 11, using Spring Boot. Queries a URI (default) as an XML source. Attempts to valida

Oct 20, 2021
Fast JSON parser for java projects

ig-json-parser Fast JSON parser for java projects. Getting started The easiest way to get started is to look at maven-example. For more comprehensive

Jul 12, 2022
ktlint JSON Lines reporter

ktlint JSON Lines reporter Usage Download the jar and run: ktlint --reporter=jsonlines,artifact=ktlint-jsonlines-reporter.jar Download Either downloa

Nov 24, 2021
Generate a JSON bookmarks document from a GitHub user

Github to bookmarks This little webapp will generate a JSON bookmarks document from a GitHub user. This is intended to be used with bbt. An instance i

Nov 8, 2021