basic structures and traits, with json read/write support