Customizable JSON Schema-based forms for Kotlin and Compose

Overview


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:

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.

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.

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

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

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

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

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

πŸš€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

 Images grid JSON | Π‘Π΅Ρ‚ΠΊΠ° ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠΉ JSON
Images grid JSON | Π‘Π΅Ρ‚ΠΊΠ° ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠΉ JSON

Images grid JSON | Π‘Π΅Ρ‚ΠΊΠ° ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠΉ JSON Π—Π°Π΄Π°Ρ‡Π° Π Π°Π·Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅: ΠŸΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ ΠΏΠΎΠ»ΡƒΡ‡Π°Ρ‚ΡŒ JSON-список ссылок Π½Π° изобраТСния с сСрвСра ΠΏΠΎ Π°Π΄Ρ€

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

Fully customizable, built from scratch NumberPicker for android. Created as an alternative to non-customizable native android NumberPicker
Fully customizable, built from scratch NumberPicker for android. Created as an alternative to non-customizable native android NumberPicker

GoodNumberPicker GoodPicker is an Android library that provides a picker with customizable UI. It was developed as alternative to the default NumberPi

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

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

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

TeslaAndroidAuth Lightweight Android library for Tesla SSO Authentication based

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

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

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

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

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

Comments
  • Documentation Invalid Link

    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?

    opened by commonsguy 1
Releases(0.7.0)
  • 0.7.0(Oct 25, 2022)

    • Updates to Kotlin 1.7.20
    • Updates to Compose 1.2.0
    • Temporarily removes Compose Web and Bulma as targets, because Compose Web does not work with Kotlin 1.7.20
    Source code(tar.gz)
    Source code(zip)
  • 0.6.0(Aug 26, 2022)

  • 0.5.0(Aug 19, 2022)

    • New json-forms-compose-core artifact has been added with all the base functionality using only Compose Runtime
    • Added json-forms-compose-bulma to display forms in Compose/Web with Bulma styling, based on json-forms-compose-core
    • json-forms-compose has been renamed to json-forms-compose-material, which is also based on json-forms-compose-core
    Source code(tar.gz)
    Source code(zip)
  • 0.4.0(Jul 17, 2022)

  • 0.3.0(Jul 16, 2022)

  • 0.2.0(Jul 15, 2022)

  • 0.1.0(Jul 14, 2022)

Owner
Copper Leaf
Supplemental utility libraries for Orchid and Kotlin
Copper Leaf
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

Square 8.7k Jan 2, 2023
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

Isaac G. Banda 21 Sep 16, 2022
A lightweight Kotlin DSL to render DSL style Json to String.

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

null 4 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")

Daniel Demidko 6 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

Google 21.7k Jan 5, 2023
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

Tammo Ippen 39 Oct 19, 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

Darius Washington 2 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

Instagram 1.3k Dec 29, 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

Anton Musichin 1 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

Benoit Lubek 2 Nov 8, 2021