Advanced

This page covers general purpose of usage scenarios for our project

When we have complex class structures and relations, we can simply represent them as some formats such as JSON.

Here is a simple example of the situation:

[
    {
        "id": "myCat",
        "target": "com.example.Cat"
        "args":[":s/Pamuk",":i/5"]
    },
    {
        "id": "myDog",
        "target": "com.example.Dog"
        "fields": [
            {"name":"name","value":":s/Karabaş"},
            {"name":"age", "value":":i/4"}
        ]
    },
    {
        "id": "catndog",
        "target":"com.example.CatNDog"
        "fields":[
            {"name":"cat", "value":"@myCat"},
            {"name":"dog", "value":"@myDog"},
        ]
    }
]

This JSON file represents our class structures and relations with each other. DepIn can read this file and generates instances of the classes that described there.

Last updated