wip: fix json struct building