Dynamic Structs by json

I try to do the following:

iex#> model = %Models.Generic{json: “{"test": "hello world"}”}
iex#> model.test
“hello world”