js and json mode