/manifold-example

This is a small how to for dynamic types with manifold and without any generator.

Primary LanguageJava

Manifold Example Project

Why?

To play with Manifold from scratch and see how it works.

For a full feature example, see the official manifold-sample-project.

What?

Currently, we have 3 examples in that project:

  1. JSON Schema Manifold
  2. Properties Manifold
  3. String Templating

To see, how it could look inside your code, see MainApp.java for examples.

How?

  1. Install IntelliJ plugin for Manifold and restart IDE
  2. Create empty maven project
  3. Add manifold dependency:
        <dependency>
            <groupId>systems.manifold</groupId>
            <artifactId>manifold-all</artifactId>
            <version>${manifold.version}</version>
        </dependency>
  4. Configure the compiler plugin:
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
    
                <configuration>
                    <encoding>UTF-8</encoding>
                    <compilerArgs>
                        <arg>-Xplugin:Manifold strings</arg>
                    </compilerArgs>
    
                    <annotationProcessorPaths>
                        <path>
                            <groupId>systems.manifold</groupId>
                            <artifactId>manifold-all</artifactId>
                            <version>${manifold.version}</version>
                        </path>
                    </annotationProcessorPaths>
    
                </configuration>
            </plugin>
        </plugins>
    </build>
  5. Create some JSON schemas or properties
  6. Write your code and access the types via autocompletion.