Rewrite JSON interface