json code generation fixes