improved json tag handling