enhancing output as hints for javascript, now using JSON