switch syntax for json