generalized spec for json data