ported some JSON schema semantics