ml-archive/Serpent

Add support for mapping nested values

dominik-hadl opened this issue · 2 comments

This might be useful in cases where we don't need to parse a whole nested object and just care about one value.

For example:

JSON

{
    "name": "Your name",
    "times": {
        "createdAt": "some time",
        "updatedAt": "some time",
        "deletedAt": "some time"
    }
}

Model

struct User {
    var name = ""
    var createdAt = Date() // <-times/createdAt
}

I have implemented this. Needs review.

Implemented in #156.