Better integration of JSON in Handler